Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
bf430d12
Commit
bf430d12
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: change test file name
parent
13626121
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Testing/Fa/0000209-SVMValidationLinearlySeparableProbEstimation.cxx
+8
-8
8 additions, 8 deletions
.../0000209-SVMValidationLinearlySeparableProbEstimation.cxx
Testing/Fa/CMakeLists.txt
+6
-6
6 additions, 6 deletions
Testing/Fa/CMakeLists.txt
with
14 additions
and
14 deletions
Testing/Fa/
otbSVMValid
ation.cxx
→
Testing/Fa/
0000209-SVMValidationLinearlySeparableProbEstim
ation.cxx
+
8
−
8
View file @
bf430d12
...
...
@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
TrainingListSampleType
::
Pointer
validationLabels
=
TrainingListSampleType
::
New
();
// Generate training set
std
::
ofstream
training
(
"training.csv"
);
//
std::ofstream training("training.csv");
for
(
unsigned
int
i
=
0
;
i
<
nbTrainingSamples
;
++
i
)
{
// Generate a positive sample
...
...
@@ -105,7 +105,7 @@ int main(int argc, char* argv[])
trainingSamples
->
PushBack
(
pSample
);
trainingLabels
->
PushBack
(
label
);
training
<<
"1 1:"
<<
pSample
[
0
]
<<
" 2:"
<<
pSample
[
1
]
<<
std
::
endl
;
//
training<<"1 1:"<<pSample[0]<<" 2:"<<pSample[1]<<std::endl;
// Generate a negative sample
angle
=
random
->
GetVariateWithOpenUpperRange
(
otb
::
CONST_2PI
);
...
...
@@ -117,10 +117,10 @@ int main(int argc, char* argv[])
trainingSamples
->
PushBack
(
nSample
);
trainingLabels
->
PushBack
(
label
);
training
<<
"2 1:"
<<
nSample
[
0
]
<<
" 2:"
<<
nSample
[
1
]
<<
std
::
endl
;
//
training<<"2 1:"<<nSample[0]<<" 2:"<<nSample[1]<<std::endl;
}
training
.
close
();
//
training.close();
// Generate validation set
...
...
@@ -137,7 +137,7 @@ int main(int argc, char* argv[])
label
[
0
]
=
1
;
validationSamples
->
PushBack
(
pSample
);
validationLabels
->
PushBack
(
label
);
validation
<<
"1 1:"
<<
pSample
[
0
]
<<
" 2:"
<<
pSample
[
1
]
<<
std
::
endl
;
//
validation<<"1 1:"<<pSample[0]<<" 2:"<<pSample[1]<<std::endl;
// Generate a negative sample
angle
=
random
->
GetVariateWithOpenUpperRange
(
otb
::
CONST_2PI
);
...
...
@@ -148,10 +148,10 @@ int main(int argc, char* argv[])
label
[
0
]
=
2
;
validationSamples
->
PushBack
(
nSample
);
validationLabels
->
PushBack
(
label
);
validation
<<
"2 1:"
<<
nSample
[
0
]
<<
" 2:"
<<
nSample
[
1
]
<<
std
::
endl
;
//
validation<<"2 1:"<<nSample[0]<<" 2:"<<nSample[1]<<std::endl;
}
validation
.
close
();
//
validation.close();
// Learn
EstimatorType
::
Pointer
estimator
=
EstimatorType
::
New
();
...
...
@@ -163,7 +163,7 @@ int main(int argc, char* argv[])
// estimator->SetParametersOptimization(true);
estimator
->
Update
();
estimator
->
SaveModel
(
"model.svm"
);
//
estimator->SaveModel("model.svm");
// Classify
ClassifierType
::
Pointer
validationClassifier
=
ClassifierType
::
New
();
...
...
This diff is collapsed.
Click to expand it.
Testing/Fa/CMakeLists.txt
+
6
−
6
View file @
bf430d12
...
...
@@ -260,11 +260,11 @@ ${TEMP}/WriteUnsignedLong.tif
# ------- FA 0000209 : SVM Validation issue -------------------------
ADD_TEST
(
FA-000209-SVMValidationLinearlySeparableWithoutProbEstimate_OK
${
CXX_TEST_PATH
}
/
otb
SVMValidation
otbSVMValid
ation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 0
)
ADD_TEST
(
FA-000209-SVMValidationLinearlySeparableWithoutProbEstimate_OK
${
CXX_TEST_PATH
}
/
0000209-
SVMValidation
LinearlySeparableProbEstimation
0000209-SVMValidationLinearlySeparableProbEstim
ation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 0
)
ADD_TEST
(
FA-000209-SVMValidationLinearlySeparableWithProbEstimate_KO
${
CXX_TEST_PATH
}
/
otb
SVMValidation
otbSVMValid
ation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 1
)
ADD_TEST
(
FA-000209-SVMValidationLinearlySeparableWithProbEstimate_KO
${
CXX_TEST_PATH
}
/
0000209-
SVMValidation
LinearlySeparableProbEstimation
0000209-SVMValidationLinearlySeparableProbEstim
ation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 1
)
# ------- Vectorization issue -----------------------------------
# FIXME Desactivated until http://bugs.orfeo-toolbox.org/view.php?id=94
...
...
@@ -310,7 +310,7 @@ TARGET_LINK_LIBRARIES(SensorModelBorder OTBIO OTBCommon OTBBasicFilters OTBProje
ADD_EXECUTABLE
(
WriteUnsignedLong WriteUnsignedLong.cxx
)
TARGET_LINK_LIBRARIES
(
WriteUnsignedLong OTBIO OTBCommon
)
ADD_EXECUTABLE
(
otb
SVMValidation
otbSVMValid
ation.cxx
)
TARGET_LINK_LIBRARIES
(
otbSVMValid
ation OTBIO OTBLearning
)
ADD_EXECUTABLE
(
0000209-
SVMValidation
LinearlySeparableProbEstimation 0000209-SVMValidationLinearlySeparableProbEstim
ation.cxx
)
TARGET_LINK_LIBRARIES
(
0000209-SVMValidationLinearlySeparableProbEstim
ation OTBIO OTBLearning
)
ENDIF
(
NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment