theplu::yat::classifier::KNN_ReciprocalDistance Struct Reference

A model of the concept Neighbor Weighting Method to be used with KNN to weight the votes of the k nearest neighbors of a sample. More...

#include <yat/classifier/KNN_ReciprocalDistance.h>

List of all members.

Public Member Functions

void operator() (const utility::VectorBase &dist, const std::vector< size_t > &k_sorted, const Target &target, utility::VectorMutable &prediction) const


Detailed Description

A model of the concept Neighbor Weighting Method to be used with KNN to weight the votes of the k nearest neighbors of a sample.

KNN_ReciprocalDistance weights the vote of a nearest neighbor with its reciprocal rank.


Member Function Documentation

void theplu::yat::classifier::KNN_ReciprocalDistance::operator() ( const utility::VectorBase dist,
const std::vector< size_t > &  k_sorted,
const Target target,
utility::VectorMutable prediction 
) const

The total vote for each class is calculated and returned in prediction.


The documentation for this struct was generated from the following file:

Generated on Tue Jan 18 02:20:10 2011 for yat by  doxygen 1.5.5