pymor.algorithms.ml.base_regressor¶
Module Contents¶
- class pymor.algorithms.ml.base_regressor.BaseRegressor[source]¶
Bases:
pymor.algorithms.ml.base_estimator.BaseEstimatorBase-class for scikit-learn-style regressors.
This class provides a
scorefunction, computing the coefficient of determination. This class cannot be used directly but serves as a base class for other regressors.Methods
Return the coefficient of determination on the data.
- score(X, y, sample_weight=None)[source]¶
Return the coefficient of determination on the data.
- Parameters:
X – Test samples for which to check the score.
y – Ground truth target values associated to the test samples.
sample_weight – Vector for weighting the different test samples.
- Returns:
The (weighted) coefficient of determination (\(R^2\)-score) on the test samples.