Public Types | |
| typedef TKernel | Kernel | 
Public Member Functions | |
| void | BatchPredict (int learner_typeid, Dataset &testset, String predictedvalue_filename) | 
| Online batch classification for multiple testing vectors.   | |
| void | Init (int learner_typeid, const Dataset &dataset, datanode *module) | 
| SVM initialization.   | |
| void | InitTrain (int learner_typeid, const Dataset &dataset, datanode *module) | 
| Initialization(data dependent) and training for SVM learners.   | |
| void | LoadModelBatchPredict (int learner_typeid, Dataset &testset, String model_filename, String predictedvalue_filename) | 
| Load models from a file, and perform offline batch classification for multiple testing vectors.   | |
| double | Predict (int learner_typeid, const Vector &vector) | 
| SVM prediction for one testing vector.   | |
Class for SVM.
Definition at line 119 of file svm.h.
| void SVM< TKernel >::BatchPredict | ( | int | learner_typeid, | |
| Dataset & | testset, | |||
| String | predictedvalue_filename | |||
| ) |  [inline] | 
        
Online batch classification for multiple testing vectors.
No need to load model file, since models are already in RAM.
Note: for test set, if no true test labels provided, just put some dummy labels (e.g. all -1) in the last row of testset
| type id of the learner | ||
| testing set | ||
| file name of the testing data | 
Definition at line 629 of file svm.h.
References Dataset::matrix(), Dataset::n_features(), Dataset::n_points(), and SVM< TKernel >::Predict().
Referenced by SVM< TKernel >::LoadModelBatchPredict(), and main().
| void SVM< TKernel >::Init | ( | int | learner_typeid, | |
| const Dataset & | dataset, | |||
| datanode * | module | |||
| ) |  [inline] | 
        
SVM initialization.
| labeled training set or testing set | ||
| number of classes (different labels) in the data set | ||
| module name | 
Definition at line 220 of file svm.h.
References fx_param_double(), fx_param_int(), fx_submodule(), ArrayList< TElem >::Init(), Dataset::n_features(), Dataset::n_labels(), and Dataset::n_points().
Referenced by SVM< TKernel >::InitTrain(), and main().
| void SVM< TKernel >::InitTrain | ( | int | learner_typeid, | |
| const Dataset & | dataset, | |||
| datanode * | module | |||
| ) |  [inline] | 
        
Initialization(data dependent) and training for SVM learners.
| typeid of the learner | ||
| number of classes (different labels) in the training set | ||
| module name | 
Definition at line 286 of file svm.h.
References SVM< TKernel >::Init().
Referenced by main().
| void SVM< TKernel >::LoadModelBatchPredict | ( | int | learner_typeid, | |
| Dataset & | testset, | |||
| String | model_filename, | |||
| String | predictedvalue_filename | |||
| ) |  [inline] | 
        
Load models from a file, and perform offline batch classification for multiple testing vectors.
| type id of the learner | ||
| testing set | ||
| name of the model file | ||
| name of the file to store classified labels | 
Definition at line 662 of file svm.h.
References SVM< TKernel >::BatchPredict().
Referenced by main().
| double SVM< TKernel >::Predict | ( | int | learner_typeid, | |
| const Vector & | datum | |||
| ) |  [inline] | 
        
SVM prediction for one testing vector.
| type id of the learner | ||
| testing vector | 
Definition at line 511 of file svm.h.
Referenced by SVM< TKernel >::BatchPredict().
 1.6.3