Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
e11658ca
Commit
e11658ca
authored
Jul 30, 2015
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: expose probability option on libsvm model
parent
5aa65077
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Modules/Applications/AppClassification/app/otbTrainLibSVM.cxx
...les/Applications/AppClassification/app/otbTrainLibSVM.cxx
+7
-0
No files found.
Modules/Applications/AppClassification/app/otbTrainLibSVM.cxx
View file @
e11658ca
...
@@ -42,6 +42,9 @@ namespace Wrapper
...
@@ -42,6 +42,9 @@ namespace Wrapper
AddParameter
(
ParameterType_Empty
,
"classifier.libsvm.opt"
,
"Parameters optimization"
);
AddParameter
(
ParameterType_Empty
,
"classifier.libsvm.opt"
,
"Parameters optimization"
);
MandatoryOff
(
"classifier.libsvm.opt"
);
MandatoryOff
(
"classifier.libsvm.opt"
);
SetParameterDescription
(
"classifier.libsvm.opt"
,
"SVM parameters optimization flag."
);
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
...
@@ -56,6 +59,10 @@ namespace Wrapper
{
{
libSVMClassifier
->
SetParameterOptimization
(
true
);
libSVMClassifier
->
SetParameterOptimization
(
true
);
}
}
if
(
IsParameterEnabled
(
"classifier.libsvm.prob"
))
{
libSVMClassifier
->
SetDoProbabilityEstimates
(
true
);
}
libSVMClassifier
->
SetC
(
GetParameterFloat
(
"classifier.libsvm.c"
));
libSVMClassifier
->
SetC
(
GetParameterFloat
(
"classifier.libsvm.c"
));
switch
(
GetParameterInt
(
"classifier.libsvm.k"
))
switch
(
GetParameterInt
(
"classifier.libsvm.k"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment