regression module¶
Regression model¶
The regression module
implements regression algorithms, where the goal is to find relationships
between continuous input and output variables. After being fitted to a learning
set, Regression algorithms can predict output values of new input data.
A regression algorithm consists of identifying a function
\(f: \mathbb{R}^{n_{\textrm{inputs}}} \to
\mathbb{R}^{n_{\textrm{outputs}}}\). Given an input point
\(x \in \mathbb{R}^{n_{\textrm{inputs}}}\), the predict method of the
regression algorithm will return the output point
\(y = f(x) \in \mathbb{R}^{n_{\textrm{outputs}}}\). See
supervised for more information.
Wherever possible, regression algorithms should also be able to compute the Jacobian matrix of the function it has learned to represent. Given an input point \(x \in \mathbb{R}^{n_{\textrm{inputs}}}\), the Jacobian predict method of the regression algorithm should thus return the matrix
This concept is implemented through
the MLRegressionAlgo class which
inherits from the MLSupervisedAlgo class.
-
class
gemseo.mlearning.regression.regression.MLRegressionAlgo(data, transformer=None, input_names=None, output_names=None, **parameters)[source]¶ Bases:
gemseo.mlearning.core.supervised.MLSupervisedAlgoMachine Learning Regression Model Algorithm.
Inheriting classes should implement the
MLSupervisedAlgo._fit()andMLSupervisedAlgo._predict()methods, andMLRegressionAlgo._predict_jacobian()method if possible.Constructor.
- Parameters
data (Dataset) – learning dataset.
transformer (dict(str)) – transformation strategy for data groups. If None, do not scale data. Default: None.
input_names (list(str)) – names of the input variables.
output_names (list(str)) – names of the output variables.
parameters – algorithm parameters.
-
class
DataFormatters[source]¶ Bases:
gemseo.mlearning.core.supervised.MLSupervisedAlgo.DataFormattersMachine learning regression model decorators.