From ceaef6e7a170a920b4653adf6453bc953f0c499c Mon Sep 17 00:00:00 2001 From: Chris Qlasty Date: Thu, 2 Nov 2017 18:30:30 +0100 Subject: [PATCH] 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. --- 11_deep_learning.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/11_deep_learning.ipynb b/11_deep_learning.ipynb index 129a291..9b06e09 100644 --- a/11_deep_learning.ipynb +++ b/11_deep_learning.ipynb @@ -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)" ] }, {