[MRG + 1] Printing the total time in cross_validation#7640
[MRG + 1] Printing the total time in cross_validation#7640TomDLT merged 3 commits intoscikit-learn:masterfrom
Conversation
| if verbose > 1: | ||
| end_msg = "%s -%s" % (msg, logger.short_format_time(score_time)) | ||
| total_time = score_time + fit_time | ||
| end_msg = "%s -%s" % (msg, logger.short_format_time(total_time)) |
There was a problem hiding this comment.
You could directly substitute it here :)
There was a problem hiding this comment.
Yes, but the line was getting too long (>79). So instead of breaking the line, I did this. So, should I change it again?
There was a problem hiding this comment.
shouldn't it say total time? or fit time and score time separately? At least total: %s maybe?
There was a problem hiding this comment.
Modified the log message
| if verbose > 1: | ||
| end_msg = "%s -%s" % (msg, logger.short_format_time(score_time)) | ||
| total_time = score_time + fit_time | ||
| end_msg = "%s -%s" % (msg, logger.short_format_time(total_time)) |
|
Thanks for the PR! |
|
Well we can test correspondence between the verbose output and the results in |
|
@jnothman a small clarification, should I check if the mean of all the scores printed through verbose setting is equal to the score obtained from |
|
Yes, I suppose you can only check the mean fit time + mean score time. On 13 October 2016 at 15:47, Srivatsan notifications@github.com wrote:
|
|
Ok, So since we don't want a test, this PR is ready for [MRG] right? |
|
@amueller One more review and merge? |
|
LGTM, merging, thanks again @srivatsan-ramesh |
Reference Issue
Fixes #7639
What does this implement/fix? Explain your changes.
Initially when doing cross_validation with verbose set, the code was printing the
score_timeinstead of thescore_time + fit_time. This PR fixes that and prints the total time.Any other comments?
@jnothman if you could elaborate on the test which you said has to be done in the comments of the issue #7639 I can add that also to this PR.