sksurv.metrics.as_integrated_brier_score_scorer¶
-
class
sksurv.metrics.
as_integrated_brier_score_scorer
(estimator, times)[source]¶ Wraps an estimator to use the negative of
integrated_brier_score()
asscore
function.The estimator needs to be able to estimate survival functions via a
predict_survival_function
method.See the User Guide for using it for hyper-parameter optimization.
- Parameters
estimator (object) – Instance of an estimator that provides
predict_survival_function
.times (array-like, shape = (n_times,)) – The time points for which to estimate the Brier score. Values must be within the range of follow-up times of the test data survival_test.
-
estimator_
¶ Estimator that was fit.
- Type
estimator
See also
Methods
__init__
(estimator, times)Initialize self.
fit
(X, y, **fit_params)score
(X, y)Returns the score on the given data.
Attributes
predict
mock imports
predict_cumulative_hazard_function
mock imports
predict_survival_function
mock imports
-
score
(X, y)[source]¶ Returns the score on the given data.
- Parameters
X (array-like of shape (n_samples, n_features)) – Input data, where n_samples is the number of samples and n_features is the number of features.
y (array-like of shape (n_samples,)) – Target relative to X for classification or regression; None for unsupervised learning.
- Returns
score
- Return type
float