From f50bb1ee0d6011969fcfc7cb084bab0ce9c4dd39 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sat, 7 Mar 2015 16:42:46 +0800 Subject: scaffolding, decided to abandon libsvm format & using matrices for easier input & output operation --- model/ranksvm.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'model/ranksvm.h') diff --git a/model/ranksvm.h b/model/ranksvm.h index ba79c48..8993b87 100644 --- a/model/ranksvm.h +++ b/model/ranksvm.h @@ -4,19 +4,22 @@ #include #include #include"../tools/dataProvider.h" +#include "../tools/easylogging++.h" class RSVM //Virtual base class for all RSVM operations { protected: - Eigen::VectorXd* model; + Eigen::VectorXd model; + int fsize; public: - virtual int train(DataProvider &D)=0; - int test(); - int saveModel(string fname); - static RSVM loadModel(string fname); - string getName(); - Eigen::MatrixXd getModel(); - Eigen::MatrixXd setModel(); + virtual int train(DataProvider D)=0; + virtual int predict(DataProvider D); + int saveModel(std::string fname); + static RSVM loadModel(std::string fname); + virtual std::string getName()=0; + Eigen::MatrixXd getModel(){ + return model;}; + void setModel(Eigen::VectorXd model); }; #endif \ No newline at end of file -- cgit v1.2.3-70-g09d2