#include <yat/classifier/KNN_Uniform.h>
Public Member Functions | |
void | operator() (const utility::VectorBase &distance, const std::vector< size_t > &k_sorted, const Target &target, utility::VectorMutable &prediction) const |
KNN_Uniform weights the nearest neighbours uniformly so the total vote for a class is equal to the number of nearest neighbors belonging to the class.
void theplu::yat::classifier::KNN_Uniform::operator() | ( | const utility::VectorBase & | distance, | |
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.