tidymodels/embed

Use of Weights and offset for models

Closed this issue · 4 comments

In insurance, the use of weights is very important, it could be important that these steps also include the use of these steps for when categories are joined.

You can read more about case weights and our plan to implement them.

Hello @juliasilge, thank you very much for your answer, but I have a couple of doubts, for example, if we used a poisson regression model, in which it had an exposure variable (EXPO) (Proportion of the time in which an observation was under observation), I could not use this variable as a weight within the regression model or within a regression tree, it should enter as an offset to the model, despite the fact that I mark it within tidymodels with the role of case_weight. How would the pre-processes work in this case, for example step_discretize_cart?, would he use the poisson loss function, or would he use anova?.

Sorry for the long message, and I appreciate your help

The appropiate steps now support case-weights, as the example step_discretize_cart() lists its support here: https://embed.tidymodels.org/reference/step_discretize_cart.html#case-weights

You can read more about case weights are used in tidymodels here:

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.