File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -999,13 +999,13 @@ overall performance of an algorithm. It appears in the bottom row
999999of the classification report; it can also be accessed directly::
10001000
10011001 >>> metrics.f1_score(y_test, y_pred, average="macro")
1002- np.float64( 0.991367...)
1002+ 0.991367...
10031003
10041004The over-fitting we saw previously can be quantified by computing the
10051005f1-score on the training data itself::
10061006
10071007 >>> metrics.f1_score(y_train, clf.predict(X_train), average="macro")
1008- np.float64( 1.0)
1008+ 1.0
10091009
10101010.. note ::
10111011
@@ -1164,8 +1164,8 @@ We can find the optimal parameters this way::
11641164 >>> for Model in [Ridge, Lasso]:
11651165 ... gscv = GridSearchCV(Model(), dict(alpha=alphas), cv=3).fit(X, y)
11661166 ... print('%s: %s' % (Model.__name__, gscv.best_params_))
1167- Ridge: {'alpha': np.float64(0.06210169418915616)}
1168- Lasso: {'alpha': np.float64(0.01268961003167922)}
1167+ Ridge: {'alpha': np.float64(0.06210169418915616))
1168+ Lasso: {'alpha': np.float64(0.01268961003167922))
11691169
11701170Built-in Hyperparameter Search
11711171~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments