From 4fd46f811f680f81efc858b788b0335427dbf26e Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Thu, 14 May 2015 11:23:27 +0800 Subject: c --- train.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'train.cpp') diff --git a/train.cpp b/train.cpp index 05787c9..0d84e24 100644 --- a/train.cpp +++ b/train.cpp @@ -27,6 +27,7 @@ int train(DataProvider &dp) { LOG(INFO)<<"Training started"; dp.getAllDataSet(D); LOG(INFO)<<"Read "<train(D); LOG(INFO)<<"Training finished,saving model"; @@ -109,7 +110,8 @@ int main(int argc, char **argv) { ("debug,d", "show debug messages") ("model,m", po::value(), "set input model file") ("output,o", po::value(), "set output model/prediction file") - ("feature,i", po::value(), "set input feature file"); + ("feature,i", po::value(), "set input feature file") + ("c,c",po::value(),"trades margin size against training error"); // Parsing program options po::store(po::parse_command_line(argc, argv, desc), vm); @@ -128,6 +130,9 @@ int main(int argc, char **argv) { mainFunc mainf; if (vm.count("train")) { + if (vm.count("c")) { + C=vm["c"].as(); + } mainf = &train; } else if (vm.count("validate")||vm.count("predict")) { -- cgit v1.2.3-70-g09d2