gemseo.mlearning.regression.algos.base_regressor module#
The base class for regression algorithms.
- class BaseRegressor(data, settings_model=None, **settings)[source]#
Bases:
BaseMLSupervisedAlgo
The base class for regression algorithms.
- Parameters:
data (Dataset) -- The learning dataset.
settings_model (BaseMLAlgoSettings | None) -- The machine learning algorithm settings as a Pydantic model. If
None
, use**settings
.**settings (Any) -- The machine learning algorithm settings. These arguments are ignored when
settings_model
is notNone
.
- Raises:
ValueError -- When both the variable and the group it belongs to have a transformer.
- DataFormatters#
alias of
RegressionDataFormatters
- Settings#
alias of
BaseRegressorSettings
- predict_jacobian(input_data)[source]#
Predict the Jacobians of the regression model at input_data.
The user can specify these input data either as a NumPy array, e.g.
array([1., 2., 3.])
or as a dictionary, e.g.{'a': array([1.]), 'b': array([2., 3.])}
.If the NumPy arrays are of dimension 2, their i-th rows represent the input data of the i-th sample; while if the NumPy arrays are of dimension 1, there is a single sample.
The type of the output data and the dimension of the output arrays will be consistent with the type of the input data and the size of the input arrays.
- predict_raw(input_data)[source]#
Predict output data from input data.
- Parameters:
input_data (RealArray) -- The input data with shape (n_samples, n_inputs).
- Returns:
The predicted output data with shape (n_samples, n_outputs).
- Return type:
RealArray
- DEFAULT_TRANSFORMER: DefaultTransformerType = mappingproxy({'inputs': <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object>, 'outputs': <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object>})#
The default transformer for the input and output data, if any.