summaryrefslogtreecommitdiff
path: root/train.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'train.cpp')
-rw-r--r--train.cpp7
1 files changed, 6 insertions, 1 deletions
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 "<<D.getSize()<<" entries with "<< D.getfSize()<<" features";
+ LOG(INFO)<<"C: "<<C;
rsvm->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<string>(), "set input model file")
("output,o", po::value<string>(), "set output model/prediction file")
- ("feature,i", po::value<string>(), "set input feature file");
+ ("feature,i", po::value<string>(), "set input feature file")
+ ("c,c",po::value<double>(),"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<double>();
+ }
mainf = &train;
}
else if (vm.count("validate")||vm.count("predict")) {