20 #ifndef otbTrainDimensionalityReductionApplicationBase_hxx
21 #define otbTrainDimensionalityReductionApplicationBase_hxx
30 template <
class TInputValue,
class TOutputValue>
35 template <
class TInputValue,
class TOutputValue>
38 ModelFactoryType::CleanFactories();
41 template <
class TInputValue,
class TOutputValue>
48 SetParameterDescription(
"algorithm",
49 "Choice of the dimensionality reduction "
50 "algorithm to use for the training.");
55 InitAutoencoderParams();
60 template <
class TInputValue,
class TOutputValue>
66 template <
class TInputValue,
class TOutputValue>
70 const std::string modelName = GetParameterString(
"algorithm");
73 if (modelName ==
"som")
75 BeforeTrainSOM(trainingListSample, modelPath);
78 if (modelName ==
"autoencoder")
81 BeforeTrainAutoencoder(trainingListSample, modelPath);
83 otbAppLogFATAL(
"Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
87 if (modelName ==
"pca")
90 TrainPCA(trainingListSample, modelPath);
92 otbAppLogFATAL(
"Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
TrainDimensionalityReductionApplicationBase()
~TrainDimensionalityReductionApplicationBase() override
void Train(typename ListSampleType::Pointer trainingListSample, std::string modelPath)
void Reduce(typename ListSampleType::Pointer validationListSample, std::string modelPath)
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
#define otbAppLogFATAL(x)