diff --git a/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx b/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx
index d4de8f2a70d6a18e510debacf94f3147d9af6d74..20d8d357aa814130afe66117d4dadd58d7a7137d 100644
--- a/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx
+++ b/Modules/Applications/AppClassification/include/otbVectorPrediction.hxx
@@ -87,8 +87,7 @@ void           VectorPrediction<RegressionMode>::DoExecute()
 
   for (auto const& feature : layer)
   {
-    MeasurementType mv;
-    mv.SetSize(nbFeatures);
+    MeasurementType mv(nbFeatures);
     for (int idx = 0; idx < nbFeatures; ++idx)
     {
       // Beware that itemIndex differs from ogr layer field index