skmultiflow.core.
RegressorMixin
Mixin class for all regression estimators in scikit-multiflow.
Methods
fit(self, X, y[, sample_weight])
fit
Fit the model.
partial_fit(self, X, y[, sample_weight])
partial_fit
Partially (incrementally) fit the model.
predict(self, X)
predict
Predict target values for the passed data.
predict_proba(self, X)
predict_proba
Estimates the probability for probabilistic/bayesian regressors
score(self, X, y[, sample_weight])
score
Returns the coefficient of determination R^2 of the prediction.
The features to train the model.
An array-like with the target values of all samples in X.
Samples weight. If not provided, uniform weights are assumed. Usage varies depending on the learning method.
The set of data samples to predict the target values for.
The matrix of samples one wants to predict the probabilities for.
The coefficient R^2 is defined as (1 - u/v), where u is the residual sum of squares ((y_true - y_pred) ** 2).sum() and v is the total sum of squares ((y_true - y_true.mean()) ** 2).sum(). The best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). A constant model that always predicts the expected value of y, disregarding the input features, would get a R^2 score of 0.0.
Test samples. For some estimators this may be a precomputed kernel matrix instead, shape = (n_samples, n_samples_fitted], where n_samples_fitted is the number of samples used in the fitting for the estimator.
True values for X.
Sample weights.
R^2 of self.predict(X) wrt. y.
Notes
The R2 score used when calling score on a regressor will use multioutput='uniform_average' from version 0.23 to keep consistent with metrics.r2_score. This will influence the score method of all the multioutput regressors (except for multioutput.MultiOutputRegressor). To specify the default value manually and avoid the warning, please either call metrics.r2_score directly or make a custom scorer with metrics.make_scorer (the built-in scorer 'r2' uses multioutput='uniform_average').
multioutput='uniform_average'
'r2'