-
Notifications
You must be signed in to change notification settings - Fork 19
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
step_woe_bin() for binning numeric and factor predictors #239
Comments
Hello @AndrewKostandy 👋 Before i take a deeper look into this method. Can you answer me what the advantage of it is over manually creating
|
Hi @EmilHvitfeldt, The core of the step is the binning of both factor and numeric variables to get the maximum WOE/IV optimized prediction power from the variable. The description of the {woeBinning} library for example states:
The binning process of (From https://www.rdocumentation.org/packages/woeBinning/versions/0.1.6/topics/woe.binning) Similarly, the
Currently, we would need to use Technically, only the binning part can be taken from a new bin_woe step and then the encoding of the bins as woe values can be done with recipe(formula, data) |>
step_bin_woe(all_predictors(), outcome = vars(creditability)) |> # Would bin both numeric and factor predictors to optimize woe/IV values
step_woe(predictors, outcome = vars(outcome)) # Would replace the bins with their woe values |
Feature
Thanks for your work on this package.
It would be great if a recipe step is added that can bin numeric and factor features by using weight of evidence against a binary outcome. There are functions that do this such as
woebin()
from {scorecard} orwoe.binning()
from {woeBinning}. This recipe step will do two things:step_woe()
currently does)Example with
woebin()
from {scorecard}:The text was updated successfully, but these errors were encountered: