climb.tool.impl.data_suite.third_party.uq360.algorithms.ensemble_heteroscedastic_regression package

Submodules

climb.tool.impl.data_suite.third_party.uq360.algorithms.ensemble_heteroscedastic_regression.ensemble_heteroscedastic_regression module

class climb.tool.impl.data_suite.third_party.uq360.algorithms.ensemble_heteroscedastic_regression.ensemble_heteroscedastic_regression.EnsembleHeteroscedasticRegression(model_type=None, config=None, device=None, verbose=True)[source]

Bases: BuiltinUQ

Ensemble Regression assumes an ensemble of models of Gaussian form for the predictive distribution and returns the mean and log variance of the ensemble of Gaussians.

fit(X, y)[source]

Fit the Ensemble of Heteroscedastic Regression models. :param X: array-like of shape (n_samples, n_features).

Features vectors of the training data.

Parameters:

y – array-like of shape (n_samples,) or (n_samples, n_targets) Target values

Returns:

self

predict(X, return_dists=False)[source]

Obtain predictions for the test points. In addition to the mean and lower/upper bounds, also returns epistemic uncertainty (return_epistemic=True) and full predictive distribution (return_dists=True). :param X: array-like of shape (n_samples, n_features).

Features vectors of the test points.

Parameters:

return_dists – If True, the predictive distribution for each instance using scipy distributions is returned.

Returns:

A namedtupe that holds y_mean: ndarray of shape (n_samples, [n_output_dims])

Mean of predictive distribution of the test points.

y_lower: ndarray of shape (n_samples, [n_output_dims])

Lower quantile of predictive distribution of the test points.

y_upper: ndarray of shape (n_samples, [n_output_dims])

Upper quantile of predictive distribution of the test points.

dists: list of predictive distribution as scipy.stats objects with length n_samples.

Only returned when return_dists is True.

Return type:

namedtuple

Module contents