diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/ranksvm.cpp | 2 | ||||
-rw-r--r-- | model/ranksvm.h | 4 | ||||
-rw-r--r-- | model/ranksvmtn.cpp | 2 | ||||
-rw-r--r-- | model/ranksvmtn.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/model/ranksvm.cpp b/model/ranksvm.cpp index 060001b..628ef37 100644 --- a/model/ranksvm.cpp +++ b/model/ranksvm.cpp @@ -37,7 +37,7 @@ RSVM* RSVM::loadModel(const string fname){ return rsvm; } -int RSVM::setModel(const Eigen::VectorXd &model) { +int RSVM::setModel(const Labels &model) { if (model.rows()!=fsize) LOG(FATAL) << "Feature size mismatch: "<<fsize<<" "<<model.cols(); this->model=model; diff --git a/model/ranksvm.h b/model/ranksvm.h index 21fb30b..5217b56 100644 --- a/model/ranksvm.h +++ b/model/ranksvm.h @@ -13,7 +13,7 @@ protected: int fsize; public: virtual int train(DataSet &D, Labels &label)=0; - virtual int predict(DataSet &D, Eigen::MatrixXd &res)=0; + virtual int predict(DataSet &D, Labels &res)=0; // TODO Not sure how to construct this // Possible solution: generate a nxn matrix each row contains the sorted list of ranker result. int saveModel(const std::string fname); @@ -21,7 +21,7 @@ public: virtual std::string getName()=0; Eigen::MatrixXd getModel(){ return model;}; - int setModel(const Eigen::VectorXd &model); + int setModel(const Labels &model); }; #endif
\ No newline at end of file diff --git a/model/ranksvmtn.cpp b/model/ranksvmtn.cpp index ef8d98c..746e967 100644 --- a/model/ranksvmtn.cpp +++ b/model/ranksvmtn.cpp @@ -7,6 +7,6 @@ int RSVMTN::train(DataSet &D, Labels &label){ return 0; }; -int RSVMTN::predict(DataSet &D, MatrixXd &res){ +int RSVMTN::predict(DataSet &D, Labels &res){ return 0; };
\ No newline at end of file diff --git a/model/ranksvmtn.h b/model/ranksvmtn.h index 21b03bd..cdb9796 100644 --- a/model/ranksvmtn.h +++ b/model/ranksvmtn.h @@ -13,7 +13,7 @@ public: return "TN"; }; virtual int train(DataSet &D, Labels &label); - virtual int predict(DataSet &D, Eigen::MatrixXd &res); + virtual int predict(DataSet &D, Labels &res); }; #endif
\ No newline at end of file |