Skip to content
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

Add count/nonnegative outcome variable type to sl3 and poisson family supporting learner properties #356

Open
Larsvanderlaan opened this issue Sep 6, 2021 · 2 comments

Comments

@Larsvanderlaan
Copy link
Contributor

Larsvanderlaan commented Sep 6, 2021

Nonnegative regression is useful in a number of contexts. For example, if one wishes to estimate the conditional variance then regressing (Y-E[Y|X])^2 on X using poisson regression makes sure the estimates are nonnegative. Also, count data is fairly common and it is beneficial to use poisson regression over linear regression in such cases.

Nice change would be:
A outcome-type called "count" and learners compatible with this outcome type should support poisson regression (e.g. HAL, glm, glmnet, xgboost, gam). By passing in family objects or other things, you can already make learners do poisson regression, but it would be nice to be natively supported.

This would require some minor changes to learners and the outcome_variable type.

Issue:
For automatic selection of outcome variable type, the difference between categorical variables with integer coding and counts may be unclear. Probably should just default to categorical? Or simply force the user to input the outcome count.

@Larsvanderlaan
Copy link
Contributor Author

I can do this.

@Larsvanderlaan
Copy link
Contributor Author

Larsvanderlaan commented Sep 6, 2021

Also, being able to pass outcome types through task$next_in_chain is useful. It is somewhat annoying that ordered/count-valued outcomes get classified as categorical after doing next_in_chain. This is only an issue if you change your outcome though, so mostly minor if the main suggestion is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants