lale.lib.autogen.gaussian_process_regressor module

class lale.lib.autogen.gaussian_process_regressor.GaussianProcessRegressor(*, kernel=None, alpha=1e-10, optimizer='fmin_l_bfgs_b', n_restarts_optimizer=0, normalize_y=False, copy_X_train=True, random_state=None, n_targets=None)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • kernel (None, not for optimizer, default None) – The kernel specifying the covariance function of the GP

  • alpha (union type, default 1e-10) –

    Value added to the diagonal of the kernel matrix during fitting

    • float, >=1e-10 for optimizer, <=1.0 for optimizer, loguniform distribution

    • or array, not for optimizer of items : Any

  • optimizer (union type, default 'fmin_l_bfgs_b') –

    Can either be one of the internally supported optimizers for optimizing the kernel’s parameters, specified by a string, or an externally defined optimizer passed as a callable

    • callable, not for optimizer

    • or ‘fmin_l_bfgs_b’

  • n_restarts_optimizer (integer, >=0 for optimizer, <=1 for optimizer, uniform distribution, default 0) – The number of restarts of the optimizer for finding the kernel’s parameters which maximize the log-marginal likelihood

  • normalize_y (boolean, default False) – Whether the target values y are normalized, i.e., the mean of the observed target values become zero

  • copy_X_train (boolean, not for optimizer, default True) – If True, a persistent copy of the training data is stored in the object

  • random_state (union type, not for optimizer, default None) –

    The generator used to initialize the centers

    • integer

    • or numpy.random.RandomState

    • or None

  • n_targets (union type, optional, not for optimizer, default None) –

    The number of dimensions of the target values. Used to decide the number of outputs when sampling from the prior distributions (i.e. calling sample_y before fit). This parameter is ignored once fit has been called.

    • integer, >=0, uniform distribution

    • or None

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – Training data

  • y (Any) – Target values

predict(X, **predict_params)

Make predictions.

Note: The predict method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – Query points where the GP is evaluated

  • return_std (boolean, optional, default False) – If True, the standard-deviation of the predictive distribution at the query points is returned along with the mean.

  • return_cov (boolean, optional, default False) – If True, the covariance of the joint predictive distribution at the query points is returned along with the mean

Returns

result – Predict using the Gaussian process regression model

Return type

Any