5 #ifndef THUNDERSVM_SVMMODEL_H 6 #define THUNDERSVM_SVMMODEL_H 8 #include <thundersvm/dataset.h> 9 #include <thundersvm/svmparam.h> 10 #include <thundersvm/kernelmatrix.h> 33 virtual vector<float_type>
predict(
const DataSet::node2d &instances,
int batch_size);
122 #endif //THUNDERSVM_SVMMODEL_H vector< int > label
only for SVC, maps logical label (0,1,2,...) to real label in dataset (maybe 2,4,5,...)
Definition: svmmodel.h:119
virtual void model_setup(const DataSet &dataset, SvmParam ¶m)
Definition: svmmodel.cpp:20
virtual vector< float_type > predict(const DataSet::node2d &instances, int batch_size)
Definition: svmmodel.cpp:112
int n_total_sv
the number of support vectors for all classes
Definition: svmmodel.h:101
void predict_dec_values(const DataSet::node2d &instances, SyncArray< float_type > &dec_values, int batch_size) const
Definition: svmmodel.cpp:72
vector< float_type > probB
be used to predict probability for each binary model
Definition: svmmodel.h:116
DataSet::node2d sv
Definition: svmmodel.h:96
SyncArray< int > n_sv
the number of support vectors for each class
Definition: svmmodel.h:98
virtual void save_to_file(string path)
Definition: svmmodel.cpp:121
SyncArray< float_type > coef
Definition: svmmodel.h:89
size_t n_binary_models
the number of binary models, equal to , where is the number of classes
Definition: svmmodel.h:110
vector< float_type > probA
be used to predict probability for each binary model
Definition: svmmodel.h:113
Dataset reader.
Definition: dataset.h:14
virtual void load_from_file(string path)
Definition: svmmodel.cpp:187
virtual void train(const DataSet &dataset, SvmParam param)=0
params for ThunderSVM
Definition: svmparam.h:13
virtual vector< float_type > cross_validation(DataSet dataset, SvmParam param, int n_fold)
Definition: svmmodel.cpp:28
Abstract class for different SVM models.
Definition: svmmodel.h:18
SyncArray< float_type > rho
the bias term for each binary model
Definition: svmmodel.h:104
int n_classes
the number of classes
Definition: svmmodel.h:107