Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
ac574321
Commit
ac574321
authored
Mar 30, 2017
by
Guillaume Pasero
Browse files
BUG: maximum train and validation sizes were not correctly handled
parent
6943826f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/Applications/AppClassification/app/otbTrainImagesClassifier.cxx
View file @
ac574321
...
@@ -336,17 +336,20 @@ void DoExecute() ITK_OVERRIDE
...
@@ -336,17 +336,20 @@ void DoExecute() ITK_OVERRIDE
// only fmt will be used for both training and validation samples
// only fmt will be used for both training and validation samples
// So we try to compute the total number of samples given input
// So we try to compute the total number of samples given input
// parameters mt, mv and vtr.
// parameters mt, mv and vtr.
if
(
mt
>
-
1
&&
mv
>
-
1
)
if
(
mt
>
-
1
&&
vtr
<
0.99999
)
{
fmt
=
mt
+
mv
;
}
if
(
mt
>
-
1
&&
mv
<=
-
1
&&
vtr
<
0.99999
)
{
{
fmt
=
static_cast
<
long
>
((
double
)
mt
/
(
1.0
-
vtr
));
fmt
=
static_cast
<
long
>
((
double
)
mt
/
(
1.0
-
vtr
));
}
}
if
(
mt
<=
-
1
&&
mv
>
-
1
&&
vtr
>
0.00001
)
if
(
mv
>
-
1
&&
vtr
>
0.00001
)
{
{
fmt
=
static_cast
<
long
>
((
double
)
mv
/
vtr
);
if
(
fmt
>
-
1
)
{
fmt
=
std
::
min
(
fmt
,
static_cast
<
long
>
((
double
)
mv
/
vtr
));
}
else
{
fmt
=
static_cast
<
long
>
((
double
)
mv
/
vtr
);
}
}
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
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