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

offset role #1281

Closed
jdonland opened this issue Jan 25, 2024 · 3 comments
Closed

offset role #1281

jdonland opened this issue Jan 25, 2024 · 3 comments
Labels

Comments

@jdonland
Copy link

There's a new package on CRAN called offsetreg, which extends tidymodels with some additional model types and engines that use an offset, i.e., a variable which should always have a coefficient of 1 in the model. Maybe recipes could implement "offset" as a special role and automagically pass them to model engines that want them?

@EmilHvitfeldt
Copy link
Member

Hello @jdonland 👋 Thank for your interest and request!

I would be hesitant to create a new special type of role. I made this decision based on a maintenance / benefit ratio.

For this to be implemented, we need to make "offset" a special role in {recipes}. This part isn't actually that hard. But it wouldn't do anything by itself. So we would also need to do a lot of changes in {workflows} (case weights was one such example tidymodels/workflows#118) which are non-trivial, and {parsnip} would need a change too, to be able to denote which model types want offsets and which doesn't. This is the minimum change needed for this to work. But i assume that some changes other places such as in {tune} would be needed as well.

This to me feels like too much additional code we have to maintain for the benefit it gives.

also, in case you haven't seen, I think you would find this interesting: tidymodels/tidymodels.org#59

@EmilHvitfeldt
Copy link
Member

if you have any further questions or issues, please feel free to file an issue!

Copy link

github-actions bot commented Jun 7, 2024

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants