diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-03-11 01:08:36 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-03-11 01:08:36 +0800 |
commit | fd32eb3bfc64564d64401f9c2ee03b1557be9c71 (patch) | |
tree | 5e997d765df9632f057ef597c490287a702b6a6a /model/ranksvm.h | |
parent | f6c22b46449fa77f90e319e4b159ccb6c2a5732b (diff) | |
download | ranksvm-fd32eb3bfc64564d64401f9c2ee03b1557be9c71.tar.gz ranksvm-fd32eb3bfc64564d64401f9c2ee03b1557be9c71.tar.bz2 ranksvm-fd32eb3bfc64564d64401f9c2ee03b1557be9c71.zip |
svm model struct
Diffstat (limited to 'model/ranksvm.h')
-rw-r--r-- | model/ranksvm.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/model/ranksvm.h b/model/ranksvm.h index 5217b56..edb80f6 100644 --- a/model/ranksvm.h +++ b/model/ranksvm.h @@ -6,10 +6,15 @@ #include"../tools/dataProvider.h" #include "../tools/easylogging++.h" +typedef struct SVMModel{ + Eigen::VectorXd weight; + double beta; +} SVMModel; + class RSVM //Virtual base class for all RSVM operations { protected: - Eigen::VectorXd model; + SVMModel model; int fsize; public: virtual int train(DataSet &D, Labels &label)=0; @@ -19,9 +24,9 @@ public: int saveModel(const std::string fname); static RSVM* loadModel(const std::string fname); virtual std::string getName()=0; - Eigen::MatrixXd getModel(){ + SVMModel getModel(){ return model;}; - int setModel(const Labels &model); + int setModel(const SVMModel &model); }; #endif
\ No newline at end of file |