MAINT accelerate plot_partial_dependence.py #21768
MAINT accelerate plot_partial_dependence.py #21768thomasjpfan merged 3 commits intoscikit-learn:mainfrom
Conversation
| print("Training HistGradientBoostingRegressor...") | ||
| tic = time() | ||
| est = HistGradientBoostingRegressor() | ||
| est = HistGradientBoostingRegressor(max_depth=7, random_state=0) |
There was a problem hiding this comment.
I would let the gradient boosting as-is. There is little gain here.
glemaitre
left a comment
There was a problem hiding this comment.
Could you fix the n_jobs=2 and the grid_resolution=10 to check if it would be OK. I assume that such a resolution would be enough to discuss the tendency on the plots.
|
HistGradientBoostingRegressor() runtime was 3.3 seconds. |
There is slight improvement on plots rendering runtime after changing these params. |
|
MatplotlibDeprecationWarning for Axes3D can be removed by adding auto_add_to_figure=False to Axes3D but a test on ckecking signatures would fail. |
glemaitre
left a comment
There was a problem hiding this comment.
LGTM. I think that we can let the warning for the moment. It could be done in another PR.
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR @siavrez ! LGTM
Changed MPLRegressor layers from (50, 50) to (30, 15) added random_state=0
R2 is 0.82 from previous 0.81
Added max_depth=7 and random_state=0 to HistGradientBoostingRegressor
R2 is the same 0.85
Prevously preceptrons convergence was the main time consuming element and for different runs it was between 25 seconds to 48 seconds
with new params it's 18.3.
Also added auto_add_to_figure=False to matplotlib Axe3D to selent depecation warning.
Reference Issues/PRs
#21598
What does this implement/fix? Explain your changes.
Any other comments?