51 virtual int set_params(map<string, string>& mapper);
52 int init(
void *params);
53 knnAveraging get_knn_averaging(
string name);
54 knnMetric get_knn_metric(
string name);
56 int Learn(
float *x,
float *y,
const float *w,
int nsamples,
int nftrs);
57 int Predict(
float *x,
float *&preds,
int nsamples,
int nftrs)
const;
MedAlgo - APIs to different algorithms: Linear Models, RF, GBM, KNN, and more.
#define ADD_SERIALIZATION_FUNCS(...)
Definition SerializableObject.h:122
#define MEDSERIALIZE_SUPPORT(Type)
Definition SerializableObject.h:108
int Predict(float *x, float *&preds, int nsamples, int nftrs) const
Predict should be implemented for each model.
Definition MedKNN.cpp:124
virtual int set_params(map< string, string > &mapper)
The parsed fields from init command.
Definition MedKNN.cpp:60
int Learn(float *x, float *y, const float *w, int nsamples, int nftrs)
Learn should be implemented for each model.
Definition MedKNN.cpp:99
Base Interface for predictor.
Definition MedAlgo.h:78
MedPredictorTypes classifier_type
The Predicotr enum type.
Definition MedAlgo.h:80
Definition SerializableObject.h:32