Application VectorRegression
Summary
This merge request adds a new application VectorRegression
that performs regression on input vector data according to a regression model.
This application is almost the same as VectorClassifier. The differences are:
- The label types are different in classification and regression (
unsigned int
vsfloat
), as well as the ogr field type (OFTInteger
versusOFTFloat
) - we need to call
SetRegressionMode(1)
on the model created by theMachineLearningModelFactory
Instead of creating the VectorRegression
by copy-pasting almost all the VectorClassifier
application, I tried to factorize the code in VectorClassifier
using templates.
- I created a new application
VectorPrediction<bool RegressionMode>
that performs regression when RegressionMode =1 and classification when RegressionMode = 0. The code of this application is the code of the old VectorClassifier, whith some modification to use the right types depending onRegressionMode
. - VectorClassifier is defined VectorPrediction<0> and VectorRegression as VectorPrediction<1>.
- The DoInit method is defined differently for VectorClassifier and VectorRegression using template specialization, to generate different documentations for the two applications
Copyright
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 -i
on latest changes and commit
Edited by Cédric Traizet