14 void init_defaults() {};
18 virtual int init(map<string, string>& mapper) {
return _tqrf.
init(mapper); }
19 virtual int set_params(map<string, string>& mapper) {
return _tqrf.
init(mapper); }
21 int Learn(
float *x,
float *y,
const float *w,
int nsamples,
int nftrs) {
22 HMTHROW_AND_ERR(
"MedTQRF does not support the Learn(float *x, float *y, float *w, int nsamples, int nftrs). Use Learn(MedFeatures &feats) API instead\n");
24 int Predict(
float *x,
float *&preds,
int nsamples,
int nftrs)
const {
25 HMTHROW_AND_ERR(
"MedTQRF does not support the Predict(float *x, float *&preds, int nsamples, int nftrs). Use Predict(MedMat<float> &x, vector<float> &preds) API instead\n");
MedAlgo - APIs to different algorithms: Linear Models, RF, GBM, KNN, and more.
@ MODEL_TQRF
to_use:"tqrf" TQRF model - creates MedTQRF
Definition MedAlgo.h:62
#define ADD_SERIALIZATION_FUNCS(...)
Definition SerializableObject.h:122
#define MEDSERIALIZE_SUPPORT(Type)
Definition SerializableObject.h:108
A class for holding features data as a virtual matrix
Definition MedFeatures.h:47
Base Interface for predictor.
Definition MedAlgo.h:78
MedPredictorTypes classifier_type
The Predicotr enum type.
Definition MedAlgo.h:80
int Predict(float *x, float *&preds, int nsamples, int nftrs) const
Predict should be implemented for each model.
Definition MedTQRF.h:24
int Learn(float *x, float *y, const float *w, int nsamples, int nftrs)
Learn should be implemented for each model.
Definition MedTQRF.h:21
virtual int init(map< string, string > &mapper)
Virtual to init object from parsed fields.
Definition MedTQRF.h:18
int Train(const MedFeatures &medf, const MedMat< float > &Y)
The basic train matrix for TQRF is MedFeatures (!!) the reason is that it contains everything in one ...
Definition TQRF.cpp:622
int init(map< string, string > &map)
Virtual to init object from parsed fields.
Definition TQRF.h:509
int Predict(MedMat< float > &x, vector< float > &preds) const
However - the basic predict for this model is MedMat !! , as here it is much simpler : we only need t...
Definition TQRF.cpp:882