November 2017
Intermediate to advanced
1035 pages
11h 31m
English
This recipe is about creating fake estimators; this isn't the pretty or exciting stuff, but it is worthwhile to have a reference point for the model you'll eventually build.
In this recipe, we'll perform the following tasks:
We'll perform these two steps for regression data and classification data.
First, we'll create the random data:
>>> from sklearn.datasets import make_regression, make_classification # classification if for later >>> X, y = make_regression() >>> from sklearn import dummy >>> dumdum = dummy.DummyRegressor() >>> dumdum.fit(X, y) DummyRegressor(constant=None, strategy='mean')
By default, the estimator ...
Read now
Unlock full access