ronkeizer / vpc

R library to create visual predictive checks (VPC)
Other
36 stars 20 forks source link

feature: bin by strata #11

Open ronkeizer opened 9 years ago

ronkeizer commented 9 years ago

have option "bin_by_strata" to allow optimized bins per strata. for both automatic and manual binning approaches

billdenney commented 6 years ago

Yes, please!

Looking at the code, it looks like something like making the output of add_stratification into a group_df (the output of group_by) and then apply auto_bin or the manual binning to each grouping level. I'm sure that I'm over-simplifying, but hopefully this can move to implementation.

I'm happy to dive a bit deeper and help with some of the coding for it.

ronkeizer commented 6 years ago

Sure, happy to get this moving. Let me look again at the code in next few days to see what approach I would take. We can then compare notes and decide what would be best way forward, and who will take lead.

billdenney commented 5 years ago

I started looking at this again today after a long hiatus, and I think that the simplest way to implement auto-binning by stratum to me would be to:

The first step for that, to me, is to make auto_bin() specific to the underlying data class that is being stratified rather than having it operate on a data.frame. I did that in #54.

ronkeizer commented 5 years ago

Thanks Bill. Will have a look in next few days, did receive a few more requests for this feature :)