diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -15,16 +15,24 @@ po::variables_map vm; int train() { RSVM *rsvm; - rsvm = RSVM::loadModel(vm["model"].as<std::string>().c_str()); - FileDP dp(vm["feature"].as<std::string>().c_str()); + rsvm = RSVM::loadModel(vm["model"].as<std::string>()); + FileDP dp(vm["feature"].as<std::string>()); + + // Generic training operations + dp.open(); DataSet D; Labels L; + LOG(INFO)<<"Training started"; while (!dp.EOFile()) { dp.getDataSet(D); dp.getLabel(L); rsvm->train(D,L); } + + LOG(INFO)<<"Training finished,saving model"; + + rsvm->saveModel(vm["output"].as<std::string>().c_str()); delete rsvm; return 0; @@ -45,6 +53,12 @@ int predict() { return 0; } +int validate() +{ + LOG(FATAL)<<"Not Implemented"; + return 0; +} + int main(int argc, char **argv) { // Defining program options po::options_description desc("Allowed options"); @@ -73,7 +87,7 @@ int main(int argc, char **argv) { } else if (vm.count("validate")) { LOG(INFO) << "Program option: validate"; - predict(); + validate(); } else if (vm.count("predict")) { LOG(INFO) << "Program option: predict"; |