9 #include <shogun/lib/config.h> 20 class CDistanceMachine;
87 virtual const char*
get_name()
const {
return "KNNSolver"; }
int32_t m_k
the k parameter in KNN
Class Distance, a base class for all the distances used in the Shogun toolbox.
SGVector< int32_t > m_train_labels
int32_t choose_class(float64_t *classes, const int32_t *train_lab) const
A generic DistanceMachine interface.
Multiclass Labels for multi-class classification.
void choose_class_for_multiple_k(int32_t *output, int32_t *classes, const int32_t *train_lab, const int32_t step) const
int32_t m_num_classes
number of classes (i.e. number of values labels can take)
int32_t m_min_label
smallest label, i.e. -1
all of classes and functions are contained in the shogun namespace
virtual SGVector< int32_t > classify_objects_k(CDistance *d, const int32_t num_lab, SGVector< int32_t > &train_lab, SGVector< int32_t > &classes) const =0
virtual CMulticlassLabels * classify_objects(CDistance *d, const int32_t num_lab, SGVector< int32_t > &train_lab, SGVector< float64_t > &classes) const =0
virtual const char * get_name() const
float64_t m_q
parameter q of rank weighting