-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC use Ames housing for transformed_target example #16741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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_ylabel('Target predicted') | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_quantiles
I used is reasonable. Ames data has 1460 samples.