Scikit-learn 19.0 updates on .fit( ) arguments

Adopting code to my needs I have found that in the scikit-learn 19.0  they recommend to put params list directly into the .fit( ) methods. That also makes the code more understandable for me as now it is more clear where these values go to (fit( ) function of DNNClassifier).
Hope this makes sense.
main
Chris Qlasty 2017-11-02 18:30:30 +01:00 committed by GitHub
parent fd0ce384f2
commit ceaef6e7a1
1 changed files with 2 additions and 2 deletions

View File

@ -3310,9 +3310,9 @@
"}\n",
"\n",
"rnd_search = RandomizedSearchCV(DNNClassifier(random_state=42), param_distribs, n_iter=50,\n",
" fit_params={\"X_valid\": X_valid1, \"y_valid\": y_valid1, \"n_epochs\": 1000},\n",
" random_state=42, verbose=2)\n",
"rnd_search.fit(X_train1, y_train1)"
"fit_params={\"X_valid\": X_valid1, \"y_valid\": y_valid1, \"n_epochs\": 1000},\n",
"rnd_search.fit(X_train1, y_train1, **fit_params)"
]
},
{