Skip to content
Snippets Groups Projects
Commit ac574321 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: maximum train and validation sizes were not correctly handled

parent 6943826f
No related branches found
No related tags found
No related merge requests found
......@@ -336,17 +336,20 @@ void DoExecute() ITK_OVERRIDE
// only fmt will be used for both training and validation samples
// So we try to compute the total number of samples given input
// parameters mt, mv and vtr.
if (mt > -1 && mv > -1)
{
fmt = mt + mv;
}
if (mt > -1 && mv <= -1 && vtr < 0.99999)
if (mt > -1 && vtr < 0.99999)
{
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);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment