Regression refactoring : TrainVectorRegression
This MR introduces a new application,
TrainVectorRegression for training a regression machine learning model from vector data, in the same fashion as
This MR includes two major changes:
TrainVectorBase(the base class for
TrainVectorClassifier), is now template on
TOutputValues(class). Before the MR it only works on
floatas feature type and
intas class type (classification case), but now it can also be used for other type like
A new application
A test has been added for the new application, using a rf classifier as regression algorithm. In the end all regression algorithm should be tested, but I think we can do that in the (future) TrainImagesRegression, to keep the same testing strategy as for classification.
This is not exactly the workflow described in the issue, because I don't think the first step is relevent (removing sampling from
TrainRegression will be deprecated at the end of the refactoring.
The next step of the refactoring is to create a
TrainImagesRegression application: it could be a composite application that chains
ImageEnvelope to create a polygon on the extent of the image,
SampleSelection to select random points over this polygon,
SampleExtraction to extract feature and predictor values over two input images and finally
TrainVectorRegression to extract the model (this is the workflow used in the
KMeansClassification composite application), what do you think ? Anyway I think this is out of the scope of this MR.
In the issue we talked about CSV input compatibility. It is hard to add it in
TrainVectorBase because of the design of the application, the best way (given the design of the learning applications) would probably to create a new application
TrainCSVBase inheriting from
LearningApplicationBase doing the CSV input reading, and then create a
TrainCSVRegression from it, and maybe also a
TrainCSVClassifier. But it there really a need for such functionality ?
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
👍votes from core developers, no 👎vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
- Optionally, run
git diff develop... -U0 --no-color | clang-format-diff.py -p1 -ion latest changes and commit