scikit-learn/scikit-learn — pull request #3817 by trevorstephens (2014-10-31 23:00:01+00:00)
Title: Show estimated end time for GBM verbose output

I have often checked in on bigger GBM models (eg 2000 trees) to find the `verbose=1` output telling me that there was still several hundred minutes remaining from the 1000 tree marker. Without an anchoring time stamp this left me with little idea of whether the update posted hours ago and I was nearly done, or if I was possibly only half way through.

This PR adds an estimated end time to the output if the user enters a negative verbosity. `-1` gives the 'occasional' update and `-2` every tree as before but with the end time shown as well. Old output still stands if using positive numbers or zero. Not sure how people will feel about the negative verbosity implementation, but I think this will be helpful for large datasets and/or big ensembles.

Quick example output for 20 trees:

clf = GradientBoostingClassifier(n_estimators=20, learning_rate=0.05, max_depth=6, verbose=-1, random_state=415)
clf.fit(train_x, train_y)

Iter Train Loss Remaining Time End Time
1 1.2427 5.95m 31 Oct 15:36
2 1.2053 5.34m 31 Oct 15:35
3 1.1716 4.58m 31 Oct 15:35
4 1.1409 3.75m 31 Oct 15:34
5 1.1131 3.18m 31 Oct 15:34
6 1.0873 2.75m 31 Oct 15:33
7 1.0640 2.42m 31 Oct 15:33
8 1.0423 2.13m 31 Oct 15:33
9 1.0227 1.88m 31 Oct 15:33
10 1.0041 1.65m 31 Oct 15:33
20 0.8781 0.00s 31 Oct 15:32