.. Copyright 2021 IRT Saint-Exupéry, https://www.irt-saintexupery.com This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. .. _gen_regression_algos: Regression algorithms ===================== .. warning:: Some capabilities may require the :ref:`installation ` of |g| with :ref:`all its features ` and some others may depend on :ref:`plugins `. .. warning:: All the features of the wrapped libraries may not be exposed through |g|. .. note:: The algorithm settings can be passed to a function of the form .. code-block:: python function(..., settings_model: Base | None = None, **settings: Any) either one by one: .. code-block:: python function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...) or using the argument name ``"settings"`` and the Pydantic model associated with the algorithm: .. code-block:: python settings = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...) function(..., settings_model=settings) .. raw:: html .. _GaussianProcessRegressor_options: GaussianProcessRegressor ------------------------ Module: :class:`gemseo.mlearning.regression.algos.gpr` :code:`from gemseo.settings.mlearning import GaussianProcessRegressor_Settings` .. raw:: html
Optional settings
  • **alpha** : *typing.Union[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. .. raw:: html
  • **bounds** : *typing.Union[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 (). .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **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. .. raw:: html
  • **n_restarts_optimizer** : *, optional* The number of restarts of the optimizer. By default it is set to 10. .. raw:: html
  • **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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **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. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _GradientBoostingRegressor_options: GradientBoostingRegressor ------------------------- Module: :class:`gemseo.mlearning.regression.algos.gradient_boosting` :code:`from gemseo.settings.mlearning import GradientBoostingRegressor_Settings` .. raw:: html
Optional settings
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **n_estimators** : *, optional* The number of boosting stages to perform. By default it is set to 100. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _LinearRegressor_options: LinearRegressor --------------- Module: :class:`gemseo.mlearning.regression.algos.linreg` :code:`from gemseo.settings.mlearning import LinearRegressor_Settings` .. raw:: html
Optional settings
  • **fit_intercept** : *, optional* Whether to fit the intercept. By default it is set to True. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **l2_penalty_ratio** : *, 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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **penalty_level** : *, optional* The penalty level greater or equal to 0. If zero, there is no penalty. By default it is set to 0.0. .. raw:: html
  • **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. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _MLPRegressor_options: MLPRegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.mlp` :code:`from gemseo.settings.mlearning import MLPRegressor_Settings` .. raw:: html
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,). .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **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. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _MOERegressor_options: MOERegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.moe` :code:`from gemseo.settings.mlearning import MOE_Settings` .. raw:: html
Optional settings
  • **hard** : *, optional* Whether to use a hard classification. By default it is set to True. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _OTGaussianProcessRegressor_options: OTGaussianProcessRegressor -------------------------- Module: :class:`gemseo.mlearning.regression.algos.ot_gpr` :code:`from gemseo.settings.mlearning import OTGaussianProcessRegressor_Settings` .. raw:: html
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. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **multi_start_algo_name** : *, 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. .. raw:: html
  • **multi_start_algo_settings** : *collections.abc.Mapping[str, typing.Any], optional* The settings of the DOE algorithm. By default it is set to {}. .. raw:: html
  • **multi_start_n_samples** : *, 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. .. raw:: html
  • **optimization_space** : *typing.Optional[gemseo.algos.design_space.DesignSpace], 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. .. raw:: html
  • **optimizer** : *, 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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
  • **trend** : *, optional* The name of the trend. By default it is set to constant. .. raw:: html
  • **use_hmat** : *typing.Optional[bool], optional* Whether to use the HMAT or LAPACK as linear algebra method. If ``None``, use HMAT when the learning size is greater than :attr:`~.OTGaussianProcessRegressor.MAX_SIZE_FOR_LAPACK`. By default it is set to None. .. raw:: html
.. _PCERegressor_options: PCERegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.pce` :code:`from gemseo.settings.mlearning import PCERegressor_Settings` .. raw:: html
Required settings
  • **probability_space** : ** The random input variables using :class:`.OTDistribution`. .. raw:: html
.. raw:: html
Optional settings
  • **cleaning_options** : *typing.Optional[gemseo.mlearning.regression.algos.pce_settings.CleaningOptions], optional* The options of the `CleaningStrategy`_. If ``None``, use :attr:`.DEFAULT_CLEANING_OPTIONS`. By default it is set to None. .. raw:: html
  • **degree** : *, optional* The polynomial degree of the PCE. By default it is set to 2. .. raw:: html
  • **discipline** : *typing.Optional[gemseo.core.discipline.discipline.Discipline], optional* The discipline to be sampled. Used only when ``use_quadrature`` is ``True`` and ``data`` is ``None``. By default it is set to None. .. raw:: html
  • **hyperbolic_parameter** : *, optional* The :math:`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. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **n_quadrature_points** : *, 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 :math:`(1+P)^d` points, where :math:`d` is the dimension of the input space and :math:`P` is the polynomial degree of the PCE. By default it is set to 0. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
  • **use_cleaning** : *, optional* Whether to use the `CleaningStrategy`_ algorithm. Otherwise, use a fixed truncation strategy (`FixedStrategy`_). By default it is set to False. .. raw:: html
  • **use_lars** : *, optional* Whether to use the `LARS`_ algorithm. This argument is ignored when ``use_quadrature`` is ``True``. By default it is set to False. .. raw:: html
  • **use_quadrature** : *, 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. .. raw:: html
.. _PolynomialRegressor_options: PolynomialRegressor ------------------- Module: :class:`gemseo.mlearning.regression.algos.polyreg` :code:`from gemseo.settings.mlearning import PolynomialRegressor_Settings` .. raw:: html
Optional settings
  • **degree** : *, optional* The polynomial degree. By default it is set to True. .. raw:: html
  • **fit_intercept** : *, optional* Whether to fit the intercept. By default it is set to True. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **l2_penalty_ratio** : *, 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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **penalty_level** : *, optional* The penalty level greater or equal to 0. If zero, there is no penalty. By default it is set to 0.0. .. raw:: html
  • **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. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _RBFRegressor_options: RBFRegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.rbf` :code:`from gemseo.settings.mlearning import RBFRegressor_Settings` .. raw:: html
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(:math:`r`), der_function(:math:`x`, :math:`|x|`, :math:`\epsilon`) shall return :math:`\epsilon^{-1} x/|x| f'(|x|/\epsilon)`. By default it is set to None. .. raw:: html
  • **epsilon** : *typing.Optional[float], 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. .. raw:: html
  • **function** : *typing.Union[gemseo.mlearning.regression.algos.rbf_settings.Function, typing.Annotated[typing.Callable[[float, float], float], WithJsonSchema(json_schema={}, mode=None)]], optional* The radial basis function. This function takes a radius :math:`r` as input, representing a distance between two points. If it is a string, then it must be one of the following: - ``"multiquadric"`` for :math:`\sqrt{(r/\epsilon)^2 + 1}`, - ``"inverse"`` for :math:`1/\sqrt{(r/\epsilon)^2 + 1}`, - ``"gaussian"`` for :math:`\exp(-(r/\epsilon)^2)`, - ``"linear"`` for :math:`r`, - ``"cubic"`` for :math:`r^3`, - ``"quintic"`` for :math:`r^5`, - ``"thin_plate"`` for :math:`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. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **smooth** : *, optional* The degree of smoothness. ``0`` involves an interpolation of the learning points. By default it is set to 0.0. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _RandomForestRegressor_options: RandomForestRegressor --------------------- Module: :class:`gemseo.mlearning.regression.algos.random_forest` :code:`from gemseo.settings.mlearning import RandomForestRegressor_Settings` .. raw:: html
Optional settings
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **n_estimators** : *, optional* The number of trees in the forest. By default it is set to 100. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **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. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _RegressorChain_options: RegressorChain -------------- Module: :class:`gemseo.mlearning.regression.algos.regressor_chain` :code:`from gemseo.settings.mlearning import RegressorChain_Settings` .. raw:: html
Optional settings
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _SVMRegressor_options: SVMRegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.svm` :code:`from gemseo.settings.mlearning import SVMRegressor_Settings` .. raw:: html
Optional settings
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html
.. _TPSRegressor_options: TPSRegressor ------------ Module: :class:`gemseo.mlearning.regression.algos.thin_plate_spline` :code:`from gemseo.settings.mlearning import TPSRegressor_Settings` .. raw:: html
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(:math:`r`), der_function(:math:`x`, :math:`|x|`, :math:`\epsilon`) shall return :math:`\epsilon^{-1} x/|x| f'(|x|/\epsilon)`. By default it is set to None. .. raw:: html
  • **epsilon** : *typing.Optional[float], 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. .. raw:: html
  • **function** : *typing.Literal[], optional* The thin plate radial basis function for :math:`r^2\log(r)`. By default it is set to thin_plate. .. raw:: html
  • **input_names** : *collections.abc.Sequence[str], optional* The names of the input variables By default it is set to (). .. raw:: html
  • **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. .. raw:: html
  • **output_names** : *collections.abc.Sequence[str], optional* The names of the output variables By default it is set to (). .. raw:: html
  • **parameters** : *collections.abc.Mapping[str, typing.Any], optional* Other parameters. By default it is set to {}. .. raw:: html
  • **smooth** : *, optional* The degree of smoothness. ``0`` involves an interpolation of the learning points. By default it is set to 0.0. .. raw:: html
  • **transformer** : *collections.abc.Mapping[str, typing.Any], optional* The strategies to transform the variables. The values are instances of :class:`.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 :class:`.BaseTransformer` will be applied to all the variables of this group. If :attr:`.IDENTITY`, do not transform the variables. By default it is set to {}. .. raw:: html