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

Commit 1216da4

Browse files
Kautenjasrowen
authored andcommitted
Update grid_search.py (#79)
Fix `best_params_` not being set after a call to `fit`. This resolves issue #73
1 parent 44a7e84 commit 1216da4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/spark_sklearn/grid_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ def _store(key_name, array, weights=None, splits=False, rank=False):
369369

370370
best_index = np.flatnonzero(results["rank_test_score"] == 1)[0]
371371
best_parameters = candidate_params[best_index]
372+
self.best_params_ = best_parameters
372373

373374
# Use one MaskedArray and mask all the places where the param is not
374375
# applicable for that candidate. Use defaultdict as each candidate may

0 commit comments

Comments
 (0)