Options for Regression algorithms

GaussianProcessRegression

Module: gemseo.mlearning.regression.gpr

Here are the options available in GEMSEO:

Options
  • alpha (Union[float,ndarray])

    The nugget effect to regularize the model.

    By default it is set to 1e-10.

  • data (Dataset)

    The learning dataset.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • kernel (Optional[openturns)

    The kernel function. If None, use a Matern(2.5).

    By default it is set to None.

  • n_restarts_optimizer (int)

    The number of restarts of the optimizer.

    By default it is set to 10.

  • optimizer (Union[str,Callable])

    The optimization algorithm to find the hyperparameters.

    By default it is set to fmin_l_bfgs_b.

  • output_names (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • random_state (Optional[int])

    The seed used to initialize the centers. If None, the random number generator is the RandomState instance used by numpy.random.

    By default it is set to None.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

LinearRegression

Module: gemseo.mlearning.regression.linreg

Here are the options available in GEMSEO:

Options
  • **parameters (Optional[Union[float,int,str,bool]])

    The parameters of the machine learning algorithm.

  • data (Dataset)

    The learning dataset.

  • fit_intercept (bool)

    Whether to fit the intercept.

    By default it is set to True.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • l2_penalty_ratio (float)

    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 (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • penalty_level (float)

    The penalty level greater or equal to 0. If 0, there is no penalty.

    By default it is set to 0.0.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

MixtureOfExperts

Module: gemseo.mlearning.regression.moe

Here are the options available in GEMSEO:

Options
  • data (Dataset)

    The learning dataset.

  • hard (bool)

    Whether clustering/classification should be hard or soft.

    By default it is set to True.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • output_names (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

PCERegression

Module: gemseo.mlearning.regression.pce

Here are the options available in GEMSEO:

Options
  • data (Dataset)

    The learning dataset.

  • degree (int)

    The polynomial degree of the PCE.

    By default it is set to 2.

  • discipline (Optional[MDODiscipline])

    The discipline to evaluate with the quadrature strategy if the learning set does not have output data. If None, use the output data from the learning set.

    By default it is set to None.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • n_quad (Optional[int])

    The total number of quadrature points used by the quadrature strategy to compute the marginal number of points by input dimension. If None, this degree will be set equal to the polynomial degree of the PCE plus one.

    By default it is set to None.

  • output_names (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • probability_space (ParameterSpace)

    The probability space defining the probability distributions of the model inputs.

  • sparse_param (Optional[Mapping[str,Union[int,float]]])

    The parameters for the Sparse Cleaning Truncation Strategy and/or hyperbolic truncation of the initial basis: - max_considered_terms (int) – The maximum considered terms (default: 120), - most_significant (int) – The most Significant number to retain (default: 30), - significance_factor (float) – Significance Factor (default: 1e-3), - hyper_factor (float) – The factor for the hyperbolic truncation strategy (default: 1.0). If None, use default values.

    By default it is set to None.

  • stieltjes (bool)

    Whether to use the Stieltjes method.

    By default it is set to True.

  • strategy (str)

    The strategy to compute the parameters of the PCE, either ‘LS’ for least-square, ‘Quad’ for quadrature or ‘SparseLS’ for sparse least-square.

    By default it is set to LS.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

PolynomialRegression

Module: gemseo.mlearning.regression.polyreg

Here are the options available in GEMSEO:

Options
  • **parameters (Optional[Union[float,int,str,bool]])

    The parameters of the machine learning algorithm.

  • data (Dataset)

    The learning dataset.

  • degree (int)

    The polynomial degree.

  • fit_intercept (bool)

    Whether to fit the intercept.

    By default it is set to True.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • l2_penalty_ratio (float)

    The penalty ratio related to the l2 regularization. If 1, the penalty is the Ridge penalty. If 0, this is the Lasso penalty. Between 0 and 1, the penalty is the ElasticNet penalty.

    By default it is set to 1.0.

  • output_names (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • penalty_level (float)

    The penalty level greater or equal to 0. If 0, there is no penalty.

    By default it is set to 0.0.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

RBFRegression

Module: gemseo.mlearning.regression.rbf

Here are the options available in GEMSEO:

Options
  • data (Dataset)

    The learning dataset.

  • der_function (Optional[Callable[[ndarray],ndarray]])

    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 a 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 (Optional[float])

    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 (Union[str,)

    The radial basis function taking a radius r as input, representing a distance between two points. If string, then it must be one of the following: .. code:: ‘multiquadric’: sqrt((r/self.epsilon)**2 + 1) ‘inverse’: 1.0/sqrt((r/self.epsilon)**2 + 1) ‘gaussian’: exp(-(r/self.epsilon)**2) ‘linear’: r ‘cubic’: r**3 ‘quintic’: r**5 ‘thin_plate’: r**2 * log(r) If callable, then it must take two arguments (self, r), e.g. lambda self, r: return 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 (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • norm (Union[str,Callable[[ndarray,ndarray],float]])

    The distance metric to be used, 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 (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • smooth (float)

    The degree of smoothness, 0 involving an interpolation of the learning points.

    By default it is set to 0.0.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.

RandomForestRegressor

Module: gemseo.mlearning.regression.random_forest

Here are the options available in GEMSEO:

Options
  • **parameters (Optional[Union[bool,int,float,str]])

    The parameters of the machine learning algorithm.

  • data (Dataset)

    The learning dataset.

  • input_names (Optional[Iterable[str]])

    The names of the input variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • n_estimators (int)

    The number of trees in the forest.

    By default it is set to 100.

  • output_names (Optional[Iterable[str]])

    The names of the output variables. If None, consider all input variables mentioned in the learning dataset.

    By default it is set to None.

  • transformer (Optional[TransformerType])

    The strategies to transform the variables. The values are instances of Transformer 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 Transformer will be applied to all the variables of this group. If None, do not transform the variables.

    By default it is set to None.