Regression models options

GaussianProcessRegression

class gemseo.mlearning.regression.gpr.GaussianProcessRegression(data, transformer=None, input_names=None, output_names=None, kernel=None, alpha=1e-10, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=10, random_state=None)[source]

Gaussian process regression

Constructor.

Parameters
  • data (Dataset) – learning dataset

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • kernel (openturns.Kernel) – kernel function. If None, use a Matern(2.5). Default: None.

  • alpha (float or array) – nugget effect. Default: 1e-10.

  • optimizer (str or callable) – optimization algorithm. Default: ‘fmin_l_bfgs_b’.

  • n_restarts_optimizer (int) – number of restarts of the optimizer. Default: 10.

  • random_state (int) – the seed used to initialize the centers. If None, the random number generator is the RandomState instance used by np.random Default: None.

LinearRegression

class gemseo.mlearning.regression.linreg.LinearRegression(data, transformer=None, input_names=None, output_names=None, fit_intercept=True, penalty_level=0.0, l2_penalty_ratio=1.0, **parameters)[source]

Linear regression

Constructor.

Parameters
  • data (Dataset) – learning dataset.

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • fit_intercept (bool) – if True, fit intercept. Default: True.

  • penalty_level (float) – penalty level greater or equal to 0. If 0, there is no penalty. Default: 0.

  • l2_penalty_ratio (float) – 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. Default: None.

MixtureOfExperts

class gemseo.mlearning.regression.moe.MixtureOfExperts(data, transformer=None, input_names=None, output_names=None, hard=True)[source]

Mixture of experts regression.

Constructor.

Parameters
  • data (Dataset) – learning dataset.

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • hard (bool) – Indicator for hard or soft clustering/classification. Hard clustering/classification if True. Default: True.

PCERegression

class gemseo.mlearning.regression.pce.PCERegression(data, probability_space, discipline=None, transformer=None, input_names=None, output_names=None, strategy='LS', degree=2, n_quad=None, stieltjes=True, sparse_param=None)[source]

Polynomial chaos expansion.

Constructor.

Parameters
  • data (Dataset) – learning dataset

  • probability_space (ParameterSpace) – probability space.

  • discipline (MDODiscipline) – discipline to evaluate if strategy=’Quad’ and data is empty.

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • strategy (str) – strategy to compute the parameters of the PCE, either ‘LS’, ‘Quad’ or ‘SparseLS’. Default: ‘LS’.

  • degree (int) – polynomial degree of the PCE

  • n_quad (int) – number of quadrature points

  • stieltjes (bool) – stieltjes

  • sparse_param

    Parameters for the Sparse Cleaning Truncation Strategy and/or hyperbolic truncation of the initial basis:

    • max_considered_terms (int) – Maximum Considered Terms,

    • most_significant (int), Most Significant number to retain,

    • significance_factor (float), Significance Factor,

    • hyper_factor (float), factor for hyperbolic truncation strategy.

PolynomialRegression

class gemseo.mlearning.regression.polyreg.PolynomialRegression(data, degree, transformer=None, input_names=None, output_names=None, fit_intercept=True, penalty_level=0.0, l2_penalty_ratio=1.0, **parameters)[source]

Polynomial regression.

Constructor.

Parameters
  • data (Dataset) – learning dataset.

  • degree (int) – Degree of polynomial. Default: 2.

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • fit_intercept (bool) – if True, fit intercept. Default: True.

  • penalty_level – penalty level greater or equal to 0. If 0, there is no penalty. Default: 0.

  • l2_penalty_ratio (float) – 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. Default: None.

RBFRegression

class gemseo.mlearning.regression.rbf.RBFRegression(data, transformer=None, input_names=None, output_names=None, function='multiquadric', der_function=None, epsilon=None, **parameters)[source]

Regression based on radial basis functions.

Constructor.

Parameters
  • data (Dataset) – learning dataset

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables. Default: None.

  • output_names (list(str)) – names of the output variables. Default: None.

  • function (str or callable) – radial basis function. Default: ‘multiquadric’.

  • der_function (callable) – derivative of radial basis function, only to be provided if function is callable and not str. The der_function should take three arguments (input_data, norm_input_data, eps). For a RBF of the form function(\(r\)), der_function(\(x\), \(|x|\), \(\epsilon\)) should return \(\epsilon^{-1} x/|x| f'(|x|/\epsilon)\). Default: None.

  • epsilon (float) – Adjustable constant for Gaussian or multiquadrics functions. Default: None.

  • parameters – other RBF parameters (sklearn).

RandomForestRegressor

class gemseo.mlearning.regression.random_forest.RandomForestRegressor(data, transformer=None, input_names=None, output_names=None, n_estimators=100, **parameters)[source]

Random forest regression

Constructor.

Parameters
  • data (Dataset) – learning dataset.

  • transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.

  • input_names (list(str)) – names of the input variables.

  • output_names (list(str)) – names of the output variables.

  • n_estimators (int) – number of trees in the forest.

  • parameters – other keyword arguments for the sklearn algo.