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
parent
fd0ce384f2
commit
ceaef6e7a1
|
@ -3310,9 +3310,9 @@
|
||||||
"}\n",
|
"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"rnd_search = RandomizedSearchCV(DNNClassifier(random_state=42), param_distribs, n_iter=50,\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",
|
" 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)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue