diff --git a/Code/Learning/otbListSampleGenerator.txx b/Code/Learning/otbListSampleGenerator.txx
index 4ea7cc7a6f35eefa6f621c626f9b3656c5876a32..913711ad6fb0d26390988025eddd91074959ad98 100644
--- a/Code/Learning/otbListSampleGenerator.txx
+++ b/Code/Learning/otbListSampleGenerator.txx
@@ -299,17 +299,7 @@ ListSampleGenerator<TImage, TVectorData>
   m_ClassesProbValidation.clear();
 
   //Go through the classes size to find the smallest one
-  double minSizeTraining = -1;
-  for (std::map<ClassLabelType, double>::const_iterator itmap = m_ClassesSize.begin();
-       itmap != m_ClassesSize.end();
-       ++itmap)
-    {
-    if ((minSizeTraining < 0) || (minSizeTraining > itmap->second))
-      {
-      minSizeTraining = itmap->second;
-      }
-    }
-
+  double minSizeTraining = m_ClassMinSize;
   double minSizeValidation = minSizeTraining;
 
   //Apply the proportion between training and validation samples (all training by default)