Commit e11658ca authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: expose probability option on libsvm model

parent 5aa65077
......@@ -42,6 +42,9 @@ namespace Wrapper
AddParameter(ParameterType_Empty, "classifier.libsvm.opt", "Parameters optimization");
MandatoryOff("classifier.libsvm.opt");
SetParameterDescription("classifier.libsvm.opt", "SVM parameters optimization flag.");
AddParameter(ParameterType_Empty, "classifier.libsvm.prob", "Probability estimation");
MandatoryOff("classifier.libsvm.prob");
SetParameterDescription("classifier.libsvm.prob", "Probability estimation flag.");
}
......@@ -56,6 +59,10 @@ namespace Wrapper
{
libSVMClassifier->SetParameterOptimization(true);
}
if (IsParameterEnabled("classifier.libsvm.prob"))
{
libSVMClassifier->SetDoProbabilityEstimates(true);
}
libSVMClassifier->SetC(GetParameterFloat("classifier.libsvm.c"));
switch (GetParameterInt("classifier.libsvm.k"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment