climb.tool.impl.data_suite.third_party.uq360.algorithms.heteroscedastic_regression package¶
Submodules¶
climb.tool.impl.data_suite.third_party.uq360.algorithms.heteroscedastic_regression.heteroscedastic_regression module¶
- class climb.tool.impl.data_suite.third_party.uq360.algorithms.heteroscedastic_regression.heteroscedastic_regression.HeteroscedasticRegression(model_type=None, model=None, config=None, device=None, verbose=True)[source]¶
Bases:
BuiltinUQWrapper for heteroscedastic regression. We learn to predict targets given features, assuming that the targets are noisy and that the amount of noise varies between data points. https://en.wikipedia.org/wiki/Heteroscedasticity
- fit(X, y)[source]¶
Fit the Heteroscedastic Regression model.
- Parameters:
X – array-like of shape (n_samples, n_features). Features vectors of the training data.
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).
- Parameters:
X – array-like of shape (n_samples, n_features). Features vectors of the test points.
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