diff options
| author | Joe Zhao <ztuowen@gmail.com> | 2015-03-08 16:42:53 +0800 | 
|---|---|---|
| committer | Joe Zhao <ztuowen@gmail.com> | 2015-03-08 16:42:53 +0800 | 
| commit | 22882d7113c13cb1e00c59b54050f16ac1b7cc30 (patch) | |
| tree | b94a20e7834ce52352aa031892d295413b65a372 /model | |
| parent | e500bb4cdb32b13cc022b6dc5d221de7ad97a73e (diff) | |
| download | ranksvm-22882d7113c13cb1e00c59b54050f16ac1b7cc30.tar.gz ranksvm-22882d7113c13cb1e00c59b54050f16ac1b7cc30.tar.bz2 ranksvm-22882d7113c13cb1e00c59b54050f16ac1b7cc30.zip  | |
migrating & scaffolding & reformatting
Added more cmdline options
Diffstat (limited to 'model')
| -rw-r--r-- | model/ranksvm.cpp | 3 | ||||
| -rw-r--r-- | model/ranksvm.h | 4 | 
2 files changed, 3 insertions, 4 deletions
diff --git a/model/ranksvm.cpp b/model/ranksvm.cpp index 58a097a..6294245 100644 --- a/model/ranksvm.cpp +++ b/model/ranksvm.cpp @@ -25,7 +25,6 @@ RSVM* RSVM::loadModel(const string fname){      RSVM* rsvm; -    // TODO multiplex type      if (type=="TN")          rsvm = new RSVMTN(); @@ -39,7 +38,7 @@ RSVM* RSVM::loadModel(const string fname){  int RSVM::setModel(const Eigen::VectorXd &model) {      if (model.cols()!=fsize) -        LOG(FATAL) << "Feature size mismatch";; +        LOG(FATAL) << "Feature size mismatch";      this->model=model;      return 0;  }
\ No newline at end of file diff --git a/model/ranksvm.h b/model/ranksvm.h index fad790d..e7b7c4a 100644 --- a/model/ranksvm.h +++ b/model/ranksvm.h @@ -12,8 +12,8 @@ protected:      Eigen::VectorXd model;      int fsize;  public: -    virtual int train(DataProvider &D)=0; -    virtual int predict(DataProvider &D)=0; +    virtual int train(DataProvider &D)=0; // Dataprovider will have to provide label +    virtual int predict(DataProvider &D)=0;  // TODO Not sure how to construct this      int saveModel(const std::string fname);      static RSVM* loadModel(const std::string fname);      virtual std::string getName()=0;  | 
