DOC use Ames housing for transformed_target example#16741
DOC use Ames housing for transformed_target example#16741glemaitre merged 21 commits intoscikit-learn:masterfrom
Conversation
|
doc-min-dependencies is failing because the An alternative is just to use instead. Though I note that the matplotlib recommended way to add a title to subplot is with |
|
This looks good. Personally I think it's more common to have y_pred on the x axis and y_true on the y axis for the scatter plot. Could you please add a residual plot?
I expect the residual plot without the TargetTransform to be "reverse-smile"/banana shaped which is a bad sign. With the target quantile transform, the banana should go away which means that the new model has a better fit. However one should observe heteroschedastic noise on the residual plots (larger residuals absolute values for larger y_pred) which means that the least square loss modeling assumption are not meant. This hints that a better model would expect the variance of the residuals to increase with the expected mean value (y_pred). This could probably be better modeled via a Tweedie loss with p in range [1, 2]. |
|
Actually my second point on heteroschedastic noise is not that obvious with the Ames dataset. Maybe leave that analysis out. I would still love to see the residual plots :) |
| ax0.set_xlabel('True Target') | ||
| ax0.set_title('Ridge regression \n without target transformation') | ||
| ax0.text(1, 9, r'$R^2$=%.2f, MAE=%.2f' % ( | ||
| ax0.set_title('Ridge regression \n without target transformation', pad=18) |
There was a problem hiding this comment.
The pad keyword argument is causing the doc build to fail with older, yet supported versions of matplotlib.
There was a problem hiding this comment.
Yes, see my comment: #16741 (comment)
I don't understand why people can't seem to see my comments on PRs - this is the second time this has happened! Do you think I changed some setting accidentally?
|
@ogrisel does this look okay? |
|
whoops, wrong x axis! |
|
ping @ogrisel |
|
Hi @lucyleeow rendering has some issues:
|
|
Thanks @cmarmo, I think i've fixed the plot problems! |
|
The banana went away, that's cool :) |
|
Thanks @lucyleeow |


Towards #16155
Use Ames housing data for
plot_transformed_target.py.Old plots:


New plots:

Hopefully
n_quantilesI used is reasonable. Ames data has 1460 samples.