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
abf16310
Commit
abf16310
authored
Apr 18, 2017
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REFAC: use SetDoProbabilityEstimates()
parent
02975278
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h
...arning/Supervised/include/otbLibSVMMachineLearningModel.h
+1
-1
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx
...ning/Supervised/include/otbLibSVMMachineLearningModel.txx
+2
-2
Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx
.../0000209-SVMValidationLinearlySeparableProbEstimation.cxx
+1
-1
Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
...lation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
+1
-1
Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx
...imulation/test/otbReduceSpectralResponseSVMClassifier.cxx
+1
-1
No files found.
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h
View file @
abf16310
...
...
@@ -154,7 +154,7 @@ public:
itkGetMacro
(
ParameterOptimization
,
bool
);
/** Do probability estimates */
void
DoProbabilityEstimates
(
bool
prob
)
void
Set
DoProbabilityEstimates
(
bool
prob
)
{
m_Parameters
.
probability
=
static_cast
<
int
>
(
prob
);
}
...
...
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx
View file @
abf16310
...
...
@@ -44,7 +44,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
this->SetC(1.0);
this->SetEpsilon(1e-3);
this->SetP(0.1);
this->DoProbabilityEstimates(false);
this->
Set
DoProbabilityEstimates(false);
this->DoShrinking(true);
this->SetCacheSize(40); // MB
this->m_ParameterOptimization = false;
...
...
@@ -355,7 +355,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
if (this->GetSVMType() == ONE_CLASS && this->GetDoProbabilityEstimates())
{
otbMsgDebugMacro(<< "Disabling SVM probability estimates for ONE_CLASS SVM type.");
this->DoProbabilityEstimates(false);
this->
Set
DoProbabilityEstimates(false);
}
const char* error_msg = svm_check_parameter(&m_Problem, &m_Parameters);
...
...
Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx
View file @
abf16310
...
...
@@ -165,7 +165,7 @@ int main(int argc, char* argv[])
estimator
->
SetTrainingSampleList
(
trainingLabels
);
estimator
->
SetKernelType
(
kernel
);
estimator
->
DoProbabilityEstimates
(
probEstimate
);
estimator
->
Set
DoProbabilityEstimates
(
probEstimate
);
// estimator->SetParametersOptimization(true);
estimator
->
Update
();
...
...
Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
View file @
abf16310
...
...
@@ -262,7 +262,7 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
SVMType
::
Pointer
classifier
=
SVMType
::
New
();
classifier
->
SetInputListSample
(
sampleList
);
classifier
->
SetTargetListSample
(
trainingList
);
classifier
->
DoProbabilityEstimates
(
true
);
classifier
->
Set
DoProbabilityEstimates
(
true
);
classifier
->
Train
();
classifier
->
Save
(
"model.txt"
);
...
...
Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx
View file @
abf16310
...
...
@@ -180,7 +180,7 @@ int otbReduceSpectralResponseSVMClassifier(int argc, char * argv[])
model
->
SetC
(
1
);
model
->
SetEpsilon
(
0.001
);
model
->
SetP
(
0.1
);
model
->
DoProbabilityEstimates
(
true
);
model
->
Set
DoProbabilityEstimates
(
true
);
model
->
Train
();
model
->
Save
(
"model.txt"
);
...
...
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