diff --git a/Applications/Classification/CMakeLists.txt b/Applications/Classification/CMakeLists.txt
index f63a2958d2ade3777fdc16ad99c67a3d0d6cd5d4..e9783817f39252c50149c1d8ad44e12feb4ebb2d 100644
--- a/Applications/Classification/CMakeLists.txt
+++ b/Applications/Classification/CMakeLists.txt
@@ -35,8 +35,8 @@ OTB_CREATE_APPLICATION(NAME           ClassificationMapRegularization
                        LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
 
 IF(OTB_USE_OPENCV)
-	OTB_CREATE_APPLICATION(NAME           TrainMachineLearningImagesClassifier
-	                       SOURCES        otbTrainMachineLearningImagesClassifier.cxx otbTrainSVM.cxx otbTrainLibSVM.cxx otbTrainBoost.cxx 
+	OTB_CREATE_APPLICATION(NAME           TrainImagesClassifier
+	                       SOURCES        otbTrainImagesClassifier.cxx otbTrainSVM.cxx otbTrainLibSVM.cxx otbTrainBoost.cxx 
 	                       				  otbTrainDecisionTree.cxx otbTrainGradientBoostedTree.cxx otbTrainNeuralNetwork.cxx otbTrainNormalBayes.cxx
 	                       				  otbTrainRandomForests.cxx otbTrainKNN.cxx
 	                       LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters;OTBFeatureExtraction;OTBLearning;OTBMachineLearning)
diff --git a/Applications/Classification/otbTrainBoost.cxx b/Applications/Classification/otbTrainBoost.cxx
index cb81d05e1b3c5766148523a7b6626749fefe28fb..813978ab7606458b84c031a097634334492269b6 100644
--- a/Applications/Classification/otbTrainBoost.cxx
+++ b/Applications/Classification/otbTrainBoost.cxx
@@ -15,14 +15,14 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 
 namespace otb
 {
 namespace Wrapper
 {
-  void TrainMachineLearningImagesClassifier::InitBoostParams()
+  void TrainImagesClassifier::InitBoostParams()
   {
     AddChoice("classifier.boost", "Boost classifier");
     SetParameterDescription("classifier.boost", "This group of parameters allows to set Boost classifier parameters."
@@ -55,7 +55,7 @@ namespace Wrapper
   }
 
 
-  void TrainMachineLearningImagesClassifier::TrainBoost(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
+  void TrainImagesClassifier::TrainBoost(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
   {
     BoostType::Pointer boostClassifier = BoostType::New();
     boostClassifier->SetInputListSample(trainingListSample);
diff --git a/Applications/Classification/otbTrainDecisionTree.cxx b/Applications/Classification/otbTrainDecisionTree.cxx
index e640c344f197c8d309280a2130692ef51ec7c0c1..98f99bf14e36d853d86b557dac0056b54173849b 100644
--- a/Applications/Classification/otbTrainDecisionTree.cxx
+++ b/Applications/Classification/otbTrainDecisionTree.cxx
@@ -15,13 +15,13 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 namespace otb
 {
 namespace Wrapper
 {
-void TrainMachineLearningImagesClassifier::InitDecisionTreeParams()
+void TrainImagesClassifier::InitDecisionTreeParams()
 {
   AddChoice("classifier.dt", "Decision Tree classifier");
   SetParameterDescription("classifier.dt",
@@ -80,7 +80,7 @@ void TrainMachineLearningImagesClassifier::InitDecisionTreeParams()
 
 }
 
-void TrainMachineLearningImagesClassifier::TrainDecisionTree(ListSampleType::Pointer trainingListSample,
+void TrainImagesClassifier::TrainDecisionTree(ListSampleType::Pointer trainingListSample,
                                                              LabelListSampleType::Pointer trainingLabeledListSample)
 {
   DecisionTreeType::Pointer classifier = DecisionTreeType::New();
diff --git a/Applications/Classification/otbTrainGradientBoostedTree.cxx b/Applications/Classification/otbTrainGradientBoostedTree.cxx
index 736b259a6da7db3fabca30860da1919d9c047832..afc4cc395b88bb98c1ccd32c6812cc19d8faa42e 100644
--- a/Applications/Classification/otbTrainGradientBoostedTree.cxx
+++ b/Applications/Classification/otbTrainGradientBoostedTree.cxx
@@ -15,13 +15,13 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 namespace otb
 {
 namespace Wrapper
 {
-void TrainMachineLearningImagesClassifier::InitGradientBoostedTreeParams()
+void TrainImagesClassifier::InitGradientBoostedTreeParams()
 {
   AddChoice("classifier.gbt", "Gradient Boosted Tree classifier");
   SetParameterDescription(
@@ -65,7 +65,7 @@ void TrainMachineLearningImagesClassifier::InitGradientBoostedTreeParams()
 
 }
 
-void TrainMachineLearningImagesClassifier::TrainGradientBoostedTree(
+void TrainImagesClassifier::TrainGradientBoostedTree(
     ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
 {
   GradientBoostedTreeType::Pointer classifier = GradientBoostedTreeType::New();
diff --git a/Applications/Classification/otbTrainMachineLearningImagesClassifier.cxx b/Applications/Classification/otbTrainImagesClassifier.cxx
similarity index 76%
rename from Applications/Classification/otbTrainMachineLearningImagesClassifier.cxx
rename to Applications/Classification/otbTrainImagesClassifier.cxx
index 53c6220ea5fff5b190a7d244b4f996968aaa1ff1..4b8feb2c11387bfd31669d0ec7161930bd8bf5c8 100644
--- a/Applications/Classification/otbTrainMachineLearningImagesClassifier.cxx
+++ b/Applications/Classification/otbTrainImagesClassifier.cxx
@@ -15,26 +15,35 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 namespace otb
 {
 namespace Wrapper
 {
 
-  void TrainMachineLearningImagesClassifier::DoInit()
+  void TrainImagesClassifier::DoInit()
   {
-    SetName("TrainMachineLearningImagesClassifier");
+    SetName("TrainImagesClassifier");
     SetDescription(
         "Train a classifier (available in OpenCV machine learning) from multiple pairs of images and training vector data.");
 
     // Documentation
     SetDocName("Train an OpenCV classifier from multiple images");
     SetDocLongDescription(
-        "This application performs a classifier training from multiple pairs of input images and training vector data. Samples are composed of pixel values in each band optionally centered and reduced using XML statistics file produced by the ComputeImagesStatistics application.\n The training vector data must contain polygons with a positive integer field representing the class label. Name of the field can be set using the \"Class label field\" parameter. Training and validation sample lists are built such that each class is equally represented in both lists. One parameter allows to control the ratio between the number of samples in training and validation sets. Two parameters allow to manage the size of the training and validation sets per class and per image.\n Several classifier parameters can be set depending on the classifier. In the validation process, the confusion matrix is organized the following way: rows = reference labels, columns = produced labels.");
+        "This application performs a classifier training from multiple pairs of input images and training vector data. "
+        "Samples are composed of pixel values in each band optionally centered and reduced using XML statistics file produced by "
+        "the ComputeImagesStatistics application.\n The training vector data must contain polygons with a positive integer field "
+        "representing the class label. Name of the field can be set using the \"Class label field\" parameter. Training and validation "
+        "sample lists are built such that each class is equally represented in both lists. One parameter allows to control the ratio "
+        "between the number of samples in training and validation sets. Two parameters allow to manage the size of the training and "
+        "validation sets per class and per image.\n Several classifier parameters can be set depending on the classifier. In the "
+        "validation process, the confusion matrix is organized the following way: rows = reference labels, columns = produced labels. "
+        "In the header of the optional confusion matrix output file, the validation (reference) and predicted (produced) class labels"
+        " are ordered according to the rows/columns of the confusion matrix.");
     SetDocLimitations("None");
     SetDocAuthors("OTB-Team");
-    SetDocSeeAlso(" OpenCV documentation for machine learning http://docs.opencv.org/modules/ml/doc/ml.html ");
+    SetDocSeeAlso("OpenCV documentation for machine learning http://docs.opencv.org/modules/ml/doc/ml.html ");
 
     AddDocTag(Tags::Learning);
 
@@ -52,6 +61,10 @@ namespace Wrapper
     AddParameter(ParameterType_OutputFilename, "io.out", "Output model");
     SetParameterDescription("io.out", "Output file containing the model estimated");
 
+    AddParameter(ParameterType_OutputFilename, "io.confmatout", "Confusion matrix output");
+    SetParameterDescription("io.confmatout", "Filename to store the output confusion matrix (csv format)");
+    MandatoryOff("io.confmatout");
+
     // Elevation
     ElevationParametersHandler::AddElevationParameters(this, "elev");
 
@@ -125,14 +138,16 @@ namespace Wrapper
     SetDocExampleParameterValue("sample.vtr", "0.5");
     SetDocExampleParameterValue("svm.opt", "true");
     SetDocExampleParameterValue("io.out", "svmModelQB1.svm");
+    SetDocExampleParameterValue("io.confmatout", "svmConfusionMatrixQB1.csv");
   }
 
-  void TrainMachineLearningImagesClassifier::DoUpdateParameters()
+  void TrainImagesClassifier::DoUpdateParameters()
   {
     // Nothing to do here : all parameters are independent
   }
 
-  void TrainMachineLearningImagesClassifier::LogConfusionMatrix(ConfusionMatrixCalculatorType* confMatCalc)
+
+  void TrainImagesClassifier::LogConfusionMatrix(ConfusionMatrixCalculatorType* confMatCalc)
   {
     ConfusionMatrixCalculatorType::ConfusionMatrixType matrix = confMatCalc->GetConfusionMatrix();
 
@@ -204,7 +219,7 @@ namespace Wrapper
     otbAppLogINFO("Confusion matrix (rows = reference labels, columns = produced labels):\n" << os.str());
   }
 
-  void TrainMachineLearningImagesClassifier::Classify(ListSampleType::Pointer validationListSample, LabelListSampleType::Pointer predictedList)
+  void TrainImagesClassifier::Classify(ListSampleType::Pointer validationListSample, LabelListSampleType::Pointer predictedList)
   {
     //Classification
     ModelPointerType model = MachineLearningModelFactoryType::CreateMachineLearningModel(GetParameterString("io.out"),
@@ -215,7 +230,7 @@ namespace Wrapper
     model->PredictAll();
   }
 
-  void TrainMachineLearningImagesClassifier::DoExecute()
+  void TrainImagesClassifier::DoExecute()
   {
     GetLogger()->Debug("Entering DoExecute\n");
     //Create training and validation for list samples and label list samples
@@ -436,7 +451,94 @@ namespace Wrapper
           "F-score of class   [" << classLabel << "] vs all: " << confMatCalc->GetFScores()[itClasses] << "\n");
       }
     otbAppLogINFO("Global performance, Kappa index: " << confMatCalc->GetKappaIndex());
-    // TODO: implement hyperplan distance classifier and performance validation (cf. object detection) ?
+
+
+    if (this->HasValue("io.confmatout"))
+      {
+      // Writing the confusion matrix in the output .CSV file
+
+      MapOfClassesType::iterator itMapOfClassesValid, itMapOfClassesPred;
+      ClassLabelType labelValid = 0;
+
+      ConfusionMatrixType confusionMatrix = confMatCalc->GetConfusionMatrix();
+      MapOfClassesType mapOfClassesValid = confMatCalc->GetMapOfClasses();
+
+      unsigned int nbClassesPred = mapOfClassesValid.size();
+
+      /////////////////////////////////////////////
+      // Filling the 2 headers for the output file
+      const std::string commentValidStr = "#Reference labels (rows):";
+      const std::string commentPredStr = "#Produced labels (columns):";
+      const char separatorChar = ',';
+      std::ostringstream ossHeaderValidLabels, ossHeaderPredLabels;
+
+      // Filling ossHeaderValidLabels and ossHeaderPredLabels for the output file
+      ossHeaderValidLabels << commentValidStr;
+      ossHeaderPredLabels << commentPredStr;
+      itMapOfClassesValid = mapOfClassesValid.begin();
+      while (itMapOfClassesValid != mapOfClassesValid.end())
+        {
+        // labels labelValid of mapOfClassesValid are already sorted
+        labelValid = itMapOfClassesValid->first;
+        otbAppLogINFO("mapOfClassesValid[" << labelValid << "] = " << itMapOfClassesValid->second);
+
+        ossHeaderValidLabels << labelValid;
+        ossHeaderPredLabels << labelValid;
+        ++itMapOfClassesValid;
+        if (itMapOfClassesValid != mapOfClassesValid.end())
+          {
+          ossHeaderValidLabels << separatorChar;
+          ossHeaderPredLabels << separatorChar;
+          }
+        else
+          {
+          ossHeaderValidLabels << std::endl;
+          ossHeaderPredLabels << std::endl;
+          }
+        }
+
+
+      std::ofstream outFile;
+      outFile.open(this->GetParameterString("io.confmatout").c_str());
+      outFile << std::fixed;
+      outFile.precision(10);
+
+
+      /////////////////////////////////////
+      // Writing the 2 headers
+      outFile << ossHeaderValidLabels.str();
+      outFile << ossHeaderPredLabels.str();
+      /////////////////////////////////////
+
+      int indiceLabelValid = 0, indiceLabelPred = 0;
+
+      for (itMapOfClassesValid = mapOfClassesValid.begin(); itMapOfClassesValid != mapOfClassesValid.end(); ++itMapOfClassesValid)
+        {
+        // labels labelValid = itMapOfClassesValid->first of mapOfClassesRef are already sorted
+
+        indiceLabelPred = 0;
+        for (itMapOfClassesPred = mapOfClassesValid.begin(); itMapOfClassesPred != mapOfClassesValid.end(); ++itMapOfClassesPred)
+          {
+          // Writing the ordered confusion matrix in the output file
+          outFile << confusionMatrix(indiceLabelValid, indiceLabelPred);
+          if (indiceLabelPred < (nbClassesPred - 1))
+            {
+            outFile << separatorChar;
+            }
+          else
+            {
+            outFile << std::endl;
+            }
+          ++indiceLabelPred;
+          }
+
+        ++indiceLabelValid;
+        }
+
+      outFile.close();
+      } // END if (this->HasValue("io.confmatout"))
+
+    // TODO: implement hyperplane distance classifier and performance validation (cf. object detection) ?
 
   }
 
@@ -444,4 +546,4 @@ namespace Wrapper
 }
 }
 
-OTB_APPLICATION_EXPORT(otb::Wrapper::TrainMachineLearningImagesClassifier)
+OTB_APPLICATION_EXPORT(otb::Wrapper::TrainImagesClassifier)
diff --git a/Applications/Classification/otbTrainMachineLearningImagesClassifier.h b/Applications/Classification/otbTrainImagesClassifier.h
similarity index 94%
rename from Applications/Classification/otbTrainMachineLearningImagesClassifier.h
rename to Applications/Classification/otbTrainImagesClassifier.h
index 044a6343d2cb68d4616061b04cbf6d046cd8a87b..a7afa080b8de204f496ba3c5bef1b05d461c2e83 100644
--- a/Applications/Classification/otbTrainMachineLearningImagesClassifier.h
+++ b/Applications/Classification/otbTrainImagesClassifier.h
@@ -76,11 +76,11 @@ namespace otb
 namespace Wrapper
 {
 
-class TrainMachineLearningImagesClassifier: public Application
+class TrainImagesClassifier: public Application
 {
 public:
   /** Standard class typedefs. */
-  typedef TrainMachineLearningImagesClassifier Self;
+  typedef TrainImagesClassifier Self;
   typedef Application Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
@@ -88,7 +88,7 @@ public:
   /** Standard macro */
   itkNewMacro(Self)
 
-  itkTypeMacro(TrainMachineLearningImagesClassifier, otb::Application)
+  itkTypeMacro(TrainImagesClassifier, otb::Application)
 
   typedef otb::Image<FloatVectorImageType::InternalPixelType, 2> ImageReaderType;
 
@@ -129,6 +129,10 @@ public:
 
   // Estimate performance on validation sample
   typedef otb::ConfusionMatrixCalculator<LabelListSampleType, LabelListSampleType> ConfusionMatrixCalculatorType;
+  typedef ConfusionMatrixCalculatorType::ConfusionMatrixType ConfusionMatrixType;
+  typedef ConfusionMatrixCalculatorType::MapOfClassesType MapOfClassesType;
+  typedef ConfusionMatrixCalculatorType::ClassLabelType ClassLabelType;
+
 
   // VectorData projection filter
   typedef otb::VectorDataProjectionFilter<VectorDataType, VectorDataType> VectorDataProjectionFilterType;
@@ -138,7 +142,7 @@ public:
 
 protected:
   using Superclass::AddParameter;
-  friend void InitSVMParams(TrainMachineLearningImagesClassifier & app);
+  friend void InitSVMParams(TrainImagesClassifier & app);
 
 private:
   void DoInit();
diff --git a/Applications/Classification/otbTrainKNN.cxx b/Applications/Classification/otbTrainKNN.cxx
index 8ac5e79cb14c0497e31ebc820c48781e5b73503e..46812f847836e0aa51e3cb0166b9c5e4ab0f1674 100644
--- a/Applications/Classification/otbTrainKNN.cxx
+++ b/Applications/Classification/otbTrainKNN.cxx
@@ -15,14 +15,14 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 
 namespace otb
 {
 namespace Wrapper
 {
-  void TrainMachineLearningImagesClassifier::InitKNNParams()
+  void TrainImagesClassifier::InitKNNParams()
   {
     AddChoice("classifier.knn", "KNN classifier");
     SetParameterDescription("classifier.knn", "This group of parameters allows to set KNN classifier parameters."
@@ -36,7 +36,7 @@ namespace Wrapper
   }
 
 
-  void TrainMachineLearningImagesClassifier::TrainKNN(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
+  void TrainImagesClassifier::TrainKNN(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
   {
     KNNType::Pointer knnClassifier = KNNType::New();
     knnClassifier->SetInputListSample(trainingListSample);
diff --git a/Applications/Classification/otbTrainLibSVM.cxx b/Applications/Classification/otbTrainLibSVM.cxx
index 043f228350c746f6ab01a745211e0abe5d96c86f..88e719c108c5c843345540727f38533b93e0247b 100644
--- a/Applications/Classification/otbTrainLibSVM.cxx
+++ b/Applications/Classification/otbTrainLibSVM.cxx
@@ -15,14 +15,14 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 
 namespace otb
 {
 namespace Wrapper
 {
-  void TrainMachineLearningImagesClassifier::InitLibSVMParams()
+  void TrainImagesClassifier::InitLibSVMParams()
   {
     AddChoice("classifier.libsvm", "LibSVM classifier");
     SetParameterDescription("classifier.libsvm", "This group of parameters allows to set SVM classifier parameters.");
@@ -44,7 +44,7 @@ namespace Wrapper
   }
 
 
-  void TrainMachineLearningImagesClassifier::TrainLibSVM(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
+  void TrainImagesClassifier::TrainLibSVM(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
   {
     LibSVMType::Pointer libSVMClassifier = LibSVMType::New();
     libSVMClassifier->SetInputListSample(trainingListSample);
diff --git a/Applications/Classification/otbTrainNeuralNetwork.cxx b/Applications/Classification/otbTrainNeuralNetwork.cxx
index 1b35ecbcaddc0c8092b9306b5d04b700a39805e9..cdee923cb6728c1efee4fc926b93e06f70f725f0 100644
--- a/Applications/Classification/otbTrainNeuralNetwork.cxx
+++ b/Applications/Classification/otbTrainNeuralNetwork.cxx
@@ -16,13 +16,13 @@
  =========================================================================*/
 
 #include <boost/lexical_cast.hpp>
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 namespace otb
 {
 namespace Wrapper
 {
-void TrainMachineLearningImagesClassifier::InitNeuralNetworkParams()
+void TrainImagesClassifier::InitNeuralNetworkParams()
 {
   AddChoice("classifier.ann", "Artificial Neural Network classifier");
   SetParameterDescription("classifier.ann",
@@ -118,7 +118,7 @@ void TrainMachineLearningImagesClassifier::InitNeuralNetworkParams()
 
 }
 
-void TrainMachineLearningImagesClassifier::TrainNeuralNetwork(ListSampleType::Pointer trainingListSample,
+void TrainImagesClassifier::TrainNeuralNetwork(ListSampleType::Pointer trainingListSample,
                                                               LabelListSampleType::Pointer trainingLabeledListSample)
 {
   NeuralNetworkType::Pointer classifier = NeuralNetworkType::New();
diff --git a/Applications/Classification/otbTrainNormalBayes.cxx b/Applications/Classification/otbTrainNormalBayes.cxx
index 64f035750b5b6a7c2b98c11f0f9de7b43a86aefc..aecd996aa7d9679ecd7bd6debfd3ce334e1baa8e 100644
--- a/Applications/Classification/otbTrainNormalBayes.cxx
+++ b/Applications/Classification/otbTrainNormalBayes.cxx
@@ -15,14 +15,14 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 
 namespace otb
 {
 namespace Wrapper
 {
-  void TrainMachineLearningImagesClassifier::InitNormalBayesParams()
+  void TrainImagesClassifier::InitNormalBayesParams()
   {
     AddChoice("classifier.bayes", "Normal Bayes classifier");
     SetParameterDescription("classifier.bayes", "Use a Normal Bayes Classifier."
@@ -31,7 +31,7 @@ namespace Wrapper
   }
 
 
-  void TrainMachineLearningImagesClassifier::TrainNormalBayes(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
+  void TrainImagesClassifier::TrainNormalBayes(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
   {
     NormalBayesType::Pointer classifier = NormalBayesType::New();
     classifier->SetInputListSample(trainingListSample);
diff --git a/Applications/Classification/otbTrainRandomForests.cxx b/Applications/Classification/otbTrainRandomForests.cxx
index 7b05ceebfae10ac5130a802539b41c5fb5539f71..a74f9b24f4336868c275082778111aca1be08db1 100644
--- a/Applications/Classification/otbTrainRandomForests.cxx
+++ b/Applications/Classification/otbTrainRandomForests.cxx
@@ -15,13 +15,13 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 namespace otb
 {
 namespace Wrapper
 {
-void TrainMachineLearningImagesClassifier::InitRandomForestsParams()
+void TrainImagesClassifier::InitRandomForestsParams()
 {
   AddChoice("classifier.rf", "Random forests classifier");
   SetParameterDescription("classifier.rf",
@@ -94,7 +94,7 @@ void TrainMachineLearningImagesClassifier::InitRandomForestsParams()
   //TerminationCriteria not exposed
 }
 
-void TrainMachineLearningImagesClassifier::TrainRandomForests(ListSampleType::Pointer trainingListSample,
+void TrainImagesClassifier::TrainRandomForests(ListSampleType::Pointer trainingListSample,
                                                               LabelListSampleType::Pointer trainingLabeledListSample)
 {
   RandomForestType::Pointer classifier = RandomForestType::New();
diff --git a/Applications/Classification/otbTrainSVM.cxx b/Applications/Classification/otbTrainSVM.cxx
index cca87323e13741549191af201e05722a88cf348d..563140f71542b8229e932d0cf2030b7869d798dc 100644
--- a/Applications/Classification/otbTrainSVM.cxx
+++ b/Applications/Classification/otbTrainSVM.cxx
@@ -15,14 +15,14 @@
 
  =========================================================================*/
 
-#include "otbTrainMachineLearningImagesClassifier.h"
+#include "otbTrainImagesClassifier.h"
 
 
 namespace otb
 {
 namespace Wrapper
 {
-  void TrainMachineLearningImagesClassifier::InitSVMParams()
+  void TrainImagesClassifier::InitSVMParams()
   {
     AddChoice("classifier.svm", "SVM classifier (OpenCV)");
     SetParameterDescription("classifier.svm", "This group of parameters allows to set SVM classifier parameters."
@@ -70,7 +70,7 @@ namespace Wrapper
   }
 
 
-  void TrainMachineLearningImagesClassifier::TrainSVM(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
+  void TrainImagesClassifier::TrainSVM(ListSampleType::Pointer trainingListSample, LabelListSampleType::Pointer trainingLabeledListSample)
   {
     SVMType::Pointer SVMClassifier = SVMType::New();
     SVMClassifier->SetInputListSample(trainingListSample);
diff --git a/Code/Learning/otbConfusionMatrixCalculator.h b/Code/Learning/otbConfusionMatrixCalculator.h
index 34bed366e8616ce3f7cd8f7c009b23e4856d45ce..8e37c9a37161f736338d15ea36f738cd1a13ad57 100644
--- a/Code/Learning/otbConfusionMatrixCalculator.h
+++ b/Code/Learning/otbConfusionMatrixCalculator.h
@@ -79,7 +79,7 @@ public:
   typedef std::map<int, ClassLabelType>                                         MapOfIndicesType;
 
   /** Type for the confusion matrix */
-  typedef itk::VariableSizeMatrix<double>                                       ConfusionMatrixType;
+  typedef itk::VariableSizeMatrix<unsigned long>                                ConfusionMatrixType;
 
   /** Type for the confusion matrix measurements calculator*/
   typedef otb::ConfusionMatrixMeasurements<ConfusionMatrixType, ClassLabelType> ConfusionMatrixMeasurementsType;
diff --git a/Code/Learning/otbConfusionMatrixMeasurements.h b/Code/Learning/otbConfusionMatrixMeasurements.h
index 1bca76518fed3eaecb4de1f8abf667b8ef138da7..0ccfac6d659d702235e0fdd27c9ef82744c38042 100644
--- a/Code/Learning/otbConfusionMatrixMeasurements.h
+++ b/Code/Learning/otbConfusionMatrixMeasurements.h
@@ -44,7 +44,7 @@ namespace otb
  *  Moreover overall accuracy and \f[ \kappa \f] index are computed.
  *
  */
-template <class TConfusionMatrix = itk::VariableSizeMatrix<double>, class TLabel = int >
+template <class TConfusionMatrix = itk::VariableSizeMatrix<unsigned long>, class TLabel = int >
 class ITK_EXPORT ConfusionMatrixMeasurements :
   public itk::Object
 {
diff --git a/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx b/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
index b6660b5c3882cc2d03bff683f5f6417a26a88925..592eb7921becf07bddca09a81428810e3782805f 100644
--- a/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
+++ b/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
@@ -22,8 +22,9 @@
 
 int otbConfusionMatrixToMassOfBeliefNew(int argc, char* argv[])
 {
-  typedef itk::VariableSizeMatrix<double> ConfusionMatrixType;
-  typedef unsigned char                   LabelType;
+  typedef unsigned long                                   ConfusionMatrixEltType;
+  typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
+  typedef int                                             LabelType;
 
   // filter types
   typedef otb::ConfusionMatrixToMassOfBelief<ConfusionMatrixType, LabelType>
@@ -52,8 +53,9 @@ int otbConfusionMatrixToMassOfBeliefNew(int argc, char* argv[])
 
 int otbConfusionMatrixToMassOfBeliefTest(int argc, char* argv[])
 {
-  typedef itk::VariableSizeMatrix<double> ConfusionMatrixType;
-  typedef unsigned char                   LabelType;
+  typedef unsigned long                                   ConfusionMatrixEltType;
+  typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
+  typedef int                                             LabelType;
 
   // filter type
   typedef otb::ConfusionMatrixToMassOfBelief<ConfusionMatrixType, LabelType> ConfusionMatrixToMassOfBeliefType;
diff --git a/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx b/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
index 30dd9d0655ae184963cedff2336055a0ef7ce467..3cc386b475411fc5495222e52727121b42554119 100644
--- a/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
+++ b/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
@@ -22,8 +22,9 @@
 
 int otbConfusionMatrixMeasurementsNew(int argc, char* argv[])
 {
-  typedef itk::VariableSizeMatrix<double> ConfusionMatrixType;
-  typedef unsigned char                   LabelType;
+  typedef unsigned long                                   ConfusionMatrixEltType;
+  typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
+  typedef unsigned char                                   LabelType;
 
   // filter types
   typedef otb::ConfusionMatrixMeasurements<ConfusionMatrixType, LabelType> ConfusionMatrixMeasurements2TemplatesType;
@@ -51,8 +52,9 @@ int otbConfusionMatrixMeasurementsNew(int argc, char* argv[])
 
 int otbConfusionMatrixMeasurementsTest(int argc, char* argv[])
 {
-  typedef itk::VariableSizeMatrix<double> ConfusionMatrixType;
-  typedef unsigned char                   ClassLabelType;
+  typedef unsigned long                                   ConfusionMatrixEltType;
+  typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
+  typedef unsigned char                                   ClassLabelType;
 
   // filter type
   typedef otb::ConfusionMatrixMeasurements<ConfusionMatrixType, ClassLabelType> ConfusionMatrixMeasurementsType;