Skip to content
This repository was archived by the owner on Dec 4, 2019. It is now read-only.

Commit a742aae

Browse files
committed
Update fit_params in doctest
1 parent 1559d20 commit a742aae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

python/spark_sklearn/grid_search.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class GridSearchCV(BaseSearchCV):
125125
kernel='rbf', max_iter=-1, probability=False,
126126
random_state=None, shrinking=True, tol=...,
127127
verbose=False),
128-
fit_params={}, iid=..., n_jobs=1,
128+
fit_params=..., iid=..., n_jobs=1,
129129
param_grid=..., pre_dispatch=..., refit=...,
130130
scoring=..., verbose=...)
131131
>>> sorted(clf.cv_results_.keys())
@@ -243,10 +243,7 @@ def __init__(self, sc, estimator, param_grid, scoring=None, fit_params=None,
243243
refit=refit, cv=cv, verbose=verbose, pre_dispatch=pre_dispatch, error_score=error_score,
244244
return_train_score=return_train_score)
245245

246-
if fit_params is None:
247-
self.fit_params = {}
248-
else:
249-
self.fit_params = fit_params
246+
self.fit_params = fit_params if fit_params is not None else {}
250247

251248
self.sc = sc
252249
self.param_grid = param_grid

0 commit comments

Comments
 (0)