Regression algorithms#

Warning

Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.

Warning

All the features of the wrapped libraries may not be exposed through GEMSEO.

Note

The algorithm settings can be passed to a function of the form

function(..., settings_model: AlgorithmSettings | None = None, **settings: Any)

either one by one:

function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)

or using the argument name "settings_model" and the Pydantic model associated with the algorithm:

settings_model = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
function(..., settings_model=settings_model)

GaussianProcessRegressor#

Module: gemseo.mlearning.regression.algos.gpr

Pydantic model of the settings for GaussianProcessRegressor#
from gemseo.settings.mlearning import GaussianProcessRegressor_Settings
Optional settings
  • alpha : float | gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]], optional

    The nugget effect to regularize the model.

    By default it is set to 1e-10.

  • bounds : tuple | tuple[float, float] | collections.abc.Mapping[str, tuple[float, float]], optional

    The lower and upper bounds of the length scales.

    Either a unique lower-upper pair common to all the inputs or lower-upper pairs for some of them. When bounds is empty or when an input has no pair, the lower bound is 0.01 and the upper bound is 100.

    This argument is ignored when kernel is None.

    By default it is set to ().

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • kernel : typing.Optional[typing.Annotated[sklearn.gaussian_process.kernels.Kernel, WithJsonSchema(json_schema={}, mode=None)]], optional

    The kernel specifying the covariance model.

    If None, use a Matérn(2.5).

    By default it is set to None.

  • n_restarts_optimizer : <class 'int'>, optional

    The number of restarts of the optimizer.

    By default it is set to 10.

  • optimizer : typing.Union[str, typing.Annotated[typing.Callable, WithJsonSchema(json_schema={}, mode=None)]], optional

    The optimization algorithm to find the parameter length scales.

    By default it is set to fmin_l_bfgs_b.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • random_state : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional

    The random state parameter.

    If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.

    By default it is set to 0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

GradientBoostingRegressor#

Module: gemseo.mlearning.regression.algos.gradient_boosting

Pydantic model of the settings for GradientBoostingRegressor#
from gemseo.settings.mlearning import GradientBoostingRegressor_Settings
Optional settings
  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • n_estimators : <class 'int'>, optional

    The number of boosting stages to perform.

    By default it is set to 100.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

LinearRegressor#

Module: gemseo.mlearning.regression.algos.linreg

Pydantic model of the settings for LinearRegressor#
from gemseo.settings.mlearning import LinearRegressor_Settings
Optional settings
  • fit_intercept : <class 'bool'>, optional

    Whether to fit the intercept.

    By default it is set to True.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • l2_penalty_ratio : <class 'float'>, optional

    The penalty ratio related to the l2 regularization.

    If 1, use the Ridge penalty. If 0, use the Lasso penalty. Between 0 and 1, use the ElasticNet penalty.

    By default it is set to 1.0.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • penalty_level : <class 'float'>, optional

    The penalty level greater or equal to 0.

    If zero, there is no penalty.

    By default it is set to 0.0.

  • random_state : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional

    The random state parameter in the case of a penalty.

    If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.

    By default it is set to 0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

MLPRegressor#

Module: gemseo.mlearning.regression.algos.mlp

Pydantic model of the settings for MLPRegressor#
from gemseo.settings.mlearning import MLPRegressor_Settings
Optional settings
  • hidden_layer_sizes : tuple[typing.Annotated[int, Gt(gt=0)], ...], optional

    The number of neurons per hidden layer.

    By default it is set to (100,).

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • random_state : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional

    The random state parameter.

    If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.

    By default it is set to 0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

MOERegressor#

Module: gemseo.mlearning.regression.algos.moe

Pydantic model of the settings for MOERegressor#
from gemseo.settings.mlearning import MOE_Settings
Optional settings
  • hard : <class 'bool'>, optional

    Whether to use a hard classification.

    By default it is set to True.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

OTGaussianProcessRegressor#

Module: gemseo.mlearning.regression.algos.ot_gpr

Pydantic model of the settings for OTGaussianProcessRegressor#
from gemseo.settings.mlearning import OTGaussianProcessRegressor_Settings
Optional settings
  • covariance_model : typing.Union[collections.abc.Sequence[typing.Union[openturns.statistics.CovarianceModelImplementation, type[openturns.statistics.CovarianceModelImplementation], gemseo.mlearning.regression.algos.ot_gpr_settings.CovarianceModel]], openturns.statistics.CovarianceModelImplementation, type[openturns.statistics.CovarianceModelImplementation], gemseo.mlearning.regression.algos.ot_gpr_settings.CovarianceModel], optional

    The covariance model of the Gaussian process.

    Either an OpenTURNS covariance model class, an OpenTURNS covariance model class instance, a name of covariance model, or a list of OpenTURNS covariance model classes, OpenTURNS class instances and covariance model names, whose size is equal to the output dimension.

    By default it is set to Matern52.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • multi_start_algo_name : <enum 'DOEAlgorithmName'>, optional

    The name of the DOE algorithm.

    This DOE is used for the multi-start optimization of the covariance model parameters.

    By default it is set to OT_OPT_LHS.

  • multi_start_algo_settings : collections.abc.Mapping[str, typing.Any], optional

    The settings of the DOE algorithm.

    By default it is set to {}.

  • multi_start_n_samples : <class 'int'>, optional

    The number of starting points of the multi-start optimizer.

    This optimizer is used for the covariance model parameters.

    By default it is set to 10.

  • optimization_space : gemseo.algos.design_space.DesignSpace | None, optional

    The covariance model parameter space.

    The size of a variable must take into account the size of the output space. If None, the algorithm will use a design space with bounds defined by OpenTURNS.

    By default it is set to None.

  • optimizer : <class 'openturns.optim.OptimizationAlgorithmImplementation'>, optional

    The solver used to optimize the covariance model parameters.

    By default it is set to class=TNC class=OptimizationAlgorithmImplementation problem=class=OptimizationProblem implementation=class=OptimizationProblemImplementation objective=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[] evaluationImplementation=class=NoEvaluation name=Unnamed gradientImplementation=class=NoGradient name=Unnamed hessianImplementation=class=NoHessian name=Unnamed equality constraint=none inequality constraint=none bounds=none minimization=true dimension=0 startingPoint=class=Point name=Unnamed dimension=0 values=[] maximumIterationNumber=100 maximumCallsNumber=1000 maximumAbsoluteError=1e-05 maximumRelativeError=1e-05 maximumResidualError=1e-05 maximumConstraintError=1e-05 scale=class=Point name=Unnamed dimension=0 values=[] offset=class=Point name=Unnamed dimension=0 values=[] maxCGit=50 eta=0.25 stepmx=10 accuracy=0.0001 fmin=1 rescale=1.3.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

  • trend : <enum 'Trend'>, optional

    The name of the trend.

    By default it is set to constant.

  • use_hmat : bool | None, optional

    Whether to use the HMAT or LAPACK as linear algebra method.

    If None, use HMAT when the learning size is greater than MAX_SIZE_FOR_LAPACK.

    By default it is set to None.

PCERegressor#

Module: gemseo.mlearning.regression.algos.pce

Pydantic model of the settings for PCERegressor#
from gemseo.settings.mlearning import PCERegressor_Settings
Optional settings
  • cleaning_options : gemseo.mlearning.regression.algos.pce_settings.CleaningOptions | None, optional

    The options of the `CleaningStrategy`_.

    If None, use DEFAULT_CLEANING_OPTIONS.

    By default it is set to None.

  • degree : <class 'int'>, optional

    The polynomial degree of the PCE.

    By default it is set to 2.

  • discipline : gemseo.core.discipline.discipline.Discipline | None, optional

    The discipline to be sampled.

    Used only when use_quadrature is True and data is None.

    By default it is set to None.

  • hyperbolic_parameter : <class 'float'>, optional

    The \(q\)-quasi norm parameter of the `hyperbolic and anisotropic enumerate function`_, defined over the interval:math:]0,1].

    By default it is set to 1.0.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • n_quadrature_points : <class 'int'>, optional

    The total number of quadrature points.

    These points are used to compute the marginal number of points by input dimension when discipline is not None. If 0, use \((1+P)^d\) points, where \(d\) is the dimension of the input space and \(P\) is the polynomial degree of the PCE.

    By default it is set to 0.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • probability_space : gemseo.algos.parameter_space.ParameterSpace | None, optional

    The random input variables using OTDistribution.

    If None, PCERegressor uses data.misc["input_space"] where data is the IODataset passed at instantiation.

    By default it is set to None.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

  • use_cleaning : <class 'bool'>, optional

    Whether to use the `CleaningStrategy`_ algorithm.

    Otherwise, use a fixed truncation strategy (`FixedStrategy`_).

    By default it is set to False.

  • use_lars : <class 'bool'>, optional

    Whether to use the `LARS`_ algorithm.

    This argument is ignored when use_quadrature is True.

    By default it is set to False.

  • use_quadrature : <class 'bool'>, optional

    Whether to estimate the coefficients of the PCE by quadrature.

    If so, use the quadrature points stored in data or sample discipline. Otherwise, estimate the coefficients by least-squares regression.

    By default it is set to False.

PolynomialRegressor#

Module: gemseo.mlearning.regression.algos.polyreg

Pydantic model of the settings for PolynomialRegressor#
from gemseo.settings.mlearning import PolynomialRegressor_Settings
Optional settings
  • degree : <class 'int'>, optional

    The polynomial degree.

    By default it is set to 2.

  • fit_intercept : <class 'bool'>, optional

    Whether to fit the intercept.

    By default it is set to True.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • l2_penalty_ratio : <class 'float'>, optional

    The penalty ratio related to the l2 regularization.

    If 1, use the Ridge penalty. If 0, use the Lasso penalty. Between 0 and 1, use the ElasticNet penalty.

    By default it is set to 1.0.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • penalty_level : <class 'float'>, optional

    The penalty level greater or equal to 0.

    If zero, there is no penalty.

    By default it is set to 0.0.

  • random_state : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional

    The random state parameter in the case of a penalty.

    If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.

    By default it is set to 0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

RBFRegressor#

Module: gemseo.mlearning.regression.algos.rbf

Pydantic model of the settings for RBFRegressor#
from gemseo.settings.mlearning import RBFRegressor_Settings
Optional settings
  • der_function : typing.Optional[typing.Annotated[typing.Callable[[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], WithJsonSchema(json_schema={}, mode=None)]], optional

    The derivative of the radial basis function.

    Only to be provided if function is a callable and if the use of the model with its derivative is required. If None and if function is a callable, an error will be raised. If None and if function is a string, the class will look for its internal implementation and will raise an error if it is missing. The der_function shall take three arguments (input_data, norm_input_data, eps). For an RBF of the form function(\(r\)), der_function(\(x\), \(|x|\), \(\epsilon\)) shall return \(\epsilon^{-1} x/|x| f'(|x|/\epsilon)\).

    By default it is set to None.

  • epsilon : float | None, optional

    An adjustable constant for Gaussian or multiquadric functions.

    If None, use the average distance between input data.

    By default it is set to None.

  • function : typing.Union[gemseo.mlearning.regression.algos.rbf_settings.RBF, typing.Annotated[typing.Callable[[float, float], float], WithJsonSchema(json_schema={}, mode=None)]], optional

    The radial basis function.

    This function takes a radius \(r\) as input, representing a distance between two points. If it is a string, then it must be one of the following:

    • "multiquadric" for \(\sqrt{(r/\epsilon)^2 + 1}\),

    • "inverse" for \(1/\sqrt{(r/\epsilon)^2 + 1}\),

    • "gaussian" for \(\exp(-(r/\epsilon)^2)\),

    • "linear" for \(r\),

    • "cubic" for \(r^3\),

    • "quintic" for \(r^5\),

    • "thin_plate" for \(r^2\log(r)\).

    If it is a callable, then it must take the two arguments self and r as inputs, e.g. lambda self, r: sqrt((r/self.epsilon)**2 + 1) for the multiquadric function. The epsilon parameter will be available as self.epsilon. Other keyword arguments passed in will be available as well.

    By default it is set to multiquadric.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • norm : typing.Union[str, typing.Annotated[typing.Callable[[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], float], WithJsonSchema(json_schema={}, mode=None)]], optional

    The distance metric.

    Either a distance function name known by SciPy or a function that computes the distance between two points.

    By default it is set to euclidean.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • smooth : <class 'float'>, optional

    The degree of smoothness.

    0 involves an interpolation of the learning points.

    By default it is set to 0.0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

RandomForestRegressor#

Module: gemseo.mlearning.regression.algos.random_forest

Pydantic model of the settings for RandomForestRegressor#
from gemseo.settings.mlearning import RandomForestRegressor_Settings
Optional settings
  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • n_estimators : <class 'int'>, optional

    The number of trees in the forest.

    By default it is set to 100.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • random_state : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional

    The random state parameter.

    If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.

    By default it is set to 0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

RegressorChain#

Module: gemseo.mlearning.regression.algos.regressor_chain

Pydantic model of the settings for RegressorChain#
from gemseo.settings.mlearning import RegressorChain_Settings
Optional settings
  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

SMTRegressor#

Note

The plugin gemseo_mlearning is required.

Module: gemseo_mlearning.regression.smt_regressor

Pydantic model of the settings for SMTRegressor#
from gemseo.settings.mlearning import SMTRegressorSettings
Required settings
  • model_class_name : <enum 'SurrogateModel'>

    The class name of a surrogate model available in SMT,i.e. a subclass of`smt.surrogate_models.surrogate_model.SurrogateModel`.

Optional settings
  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

SVMRegressor#

Module: gemseo.mlearning.regression.algos.svm

Pydantic model of the settings for SVMRegressor#
from gemseo.settings.mlearning import SVMRegressor_Settings
Optional settings
  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • kernel : typing.Union[str, typing.Annotated[typing.Callable, WithJsonSchema(json_schema={}, mode=None)]], optional

    The name of the kernel or a callable for the SVM.

    Examples of names: "linear", "poly", "rbf", "sigmoid", "precomputed".

    By default it is set to rbf.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.

TPSRegressor#

Module: gemseo.mlearning.regression.algos.thin_plate_spline

Pydantic model of the settings for TPSRegressor#
from gemseo.settings.mlearning import TPSRegressor_Settings
Optional settings
  • der_function : typing.Optional[typing.Annotated[typing.Callable[[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], WithJsonSchema(json_schema={}, mode=None)]], optional

    The derivative of the radial basis function.

    Only to be provided if function is a callable and if the use of the model with its derivative is required. If None and if function is a callable, an error will be raised. If None and if function is a string, the class will look for its internal implementation and will raise an error if it is missing. The der_function shall take three arguments (input_data, norm_input_data, eps). For an RBF of the form function(\(r\)), der_function(\(x\), \(|x|\), \(\epsilon\)) shall return \(\epsilon^{-1} x/|x| f'(|x|/\epsilon)\).

    By default it is set to None.

  • epsilon : float | None, optional

    An adjustable constant for Gaussian or multiquadric functions.

    If None, use the average distance between input data.

    By default it is set to None.

  • function : typing.Literal[<RBF.THIN_PLATE: 'thin_plate'>], optional

    The thin plate radial basis function for \(r^2\log(r)\).

    By default it is set to thin_plate.

  • input_names : collections.abc.Sequence[str], optional

    The names of the input variables

    By default it is set to ().

  • norm : typing.Union[str, typing.Annotated[typing.Callable[[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], float], WithJsonSchema(json_schema={}, mode=None)]], optional

    The distance metric.

    Either a distance function name known by SciPy or a function that computes the distance between two points.

    By default it is set to euclidean.

  • output_names : collections.abc.Sequence[str], optional

    The names of the output variables

    By default it is set to ().

  • parameters : collections.abc.Mapping[str, typing.Any], optional

    Other parameters.

    By default it is set to {}.

  • smooth : <class 'float'>, optional

    The degree of smoothness.

    0 involves an interpolation of the learning points.

    By default it is set to 0.0.

  • transformer : collections.abc.Mapping[str, typing.Any], optional

    The strategies to transform the variables.

    The values are instances of BaseTransformer while the keys are the names of either the variables or the groups of variables, e.g. "inputs" or "outputs" in the case of the regression algorithms. If a group is specified, the BaseTransformer will be applied to all the variables of this group. If IDENTITY, do not transform the variables.

    By default it is set to {}.