#ifndef _KNN_H
#define _KNN_H




class KNN
{

public:

KNN(struct lkm_parameter *par, struct problem *prob);
~KNN();

void train();
double *predict(struct problem *test);
double *predict(struct problem *test, int k);

double predict_one(struct node *test);
double predict_one(struct node *test, int k);

double static majorityRuleBin(double *ls, int k);
double static count(double *ls, int k, double lab);

void cross_validation(int nr_fold, double *target);

private:

struct lkm_parameter *par;
struct problem *prob;
CoverTree *coverTree;
};




#endif
