Skip to content
Snippets Groups Projects
Commit b444cc9c authored by Raghav RV's avatar Raghav RV Committed by Joel Nothman
Browse files

[MRG+2] Timing and training score in GridSearchCV (#7325)

* Resolved issue #6894 and #6895:
    Now *SearchCV.results_ includes both timing and training scores.

wrote new test (sklearn/model_selection/test_search.py)
and new doctest (sklearn/model_selection/_search.py)
added a few more lines in the docstring of GridSearchCV and RandomizedSearchCV.
Revised code according to suggestions.
Add a few more lines to test_grid_search_results():
    1. check test_rank_score always >= 1
    2. check all regular scores (test/train_mean/std_score) and timing >= 0
    3. check all regular scores <= 1
Note that timing can be greater than 1 in general, and std of regular scores
always <= 1 because the scores are bounded between 0 and 1.

* ENH/FIX timing and training score.

* ENH separate fit / score times
* Make score_time=0 if errored; Ignore warnings in test
* Cleanup docstrings
* ENH Use helper to store the results
* Move fit time computation to else of try...except...else
* DOC readable sample scores
* COSMIT Add a commnent on why time test is >= 0 instead of > 0
  (Windows time.time precision is not accurate enought to be non-zero
   for trivial fits)

* Convey that times are in seconds
parent 3a106fc7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment