From 7dc8426cbdff83e622fa321a7b3d44733f15cd1a Mon Sep 17 00:00:00 2001 From: Dat Le Date: Wed, 8 Jul 2015 16:05:02 +0800 Subject: [PATCH] Fixed sample code in Randomized Search. --- docs/guide_advanced.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide_advanced.rst b/docs/guide_advanced.rst index e2cd7d0..4610e2d 100644 --- a/docs/guide_advanced.rst +++ b/docs/guide_advanced.rst @@ -98,8 +98,8 @@ In the cases when you have large numbers of hyper-parameters that you want to tr from scipy import stats from sklearn.grid_search import RandomizedSearchCV - rs = RandomizedSearchCV(nn, param_grid={ - learning_rate: stats.uniform(0.001, 0.05), + rs = RandomizedSearchCV(nn, param_distributions={ + 'learning_rate': stats.uniform(0.001, 0.05), 'hidden0__units': stats.randint(4, 12), 'hidden0__type': ["Rectifier", "Sigmoid", "Tanh"]}) rs.fit(a_in, a_out)