climb.tool.impl.data_suite.third_party.uq360.algorithms.auxiliary_interval_predictor package¶
Submodules¶
climb.tool.impl.data_suite.third_party.uq360.algorithms.auxiliary_interval_predictor.auxiliary_interval_predictor module¶
- class climb.tool.impl.data_suite.third_party.uq360.algorithms.auxiliary_interval_predictor.auxiliary_interval_predictor.AuxiliaryIntervalPredictor(model_type=None, main_model=None, aux_model=None, config=None, device=None, verbose=True)[source]¶
Bases:
BuiltinUQAuxiliary Interval Predictor [1] uses an auxiliary model to encourage calibration of the main model.
References
- fit(X, y)[source]¶
Fit the Auxiliary Interval Predictor 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 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