Hi,
I'm trying to use GridSearchCV to tune the parameters for DecisionTreeRegressor. I'm using sklearn 0.18.1
I'm getting the following error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-36-192f7c286a58> in <module>()
1 # Fit the training data to the model using grid search
----> 2 reg = fit_model(X_train, y_train)
3
4 # Produce the value for 'max_depth'
5 print "Parameter 'max_depth' is {} for the optimal model.".format(reg.get_params()['max_depth'])
<ipython-input-35-500141c331d9> in fit_model(X, y)
11
12 # Create cross-validation sets from the training data
---> 13 cv_sets = ShuffleSplit(X.shape[0], n_splits = 10, test_size = 0.20, random_state = 0)
14
15 # TODO: Create a decision tree regressor object
TypeError: __init__() got multiple values for keyword argument 'n_splits'
--
Thanks,Shubham Singh Tomar