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

additive models #34

Open
benkeser opened this issue Sep 25, 2018 · 2 comments
Open

additive models #34

benkeser opened this issue Sep 25, 2018 · 2 comments

Comments

@benkeser
Copy link

It would be very cool to add a formula interface for fitting HAL additive models.

So if X has two columns x1, x2 you could write

fit_hal(..., formula = "x1 + x2")

and it would fit a 1-degree HAL

fit_hal(..., formula = "x1*x2")

would fit the 2-degree HAL, etc...

@Larsvanderlaan
Copy link
Collaborator

I happened to stumble upon this request.
I've implemented the formula interface in a clone of the hal9001 package. You can see this here: https://github.com/Larsvanderlaan/RStatisticalSoftware/blob/master/hal9001fast/R/formula_hal9001.R. I've added quite a few bells and whistles which allow for much more flexible modeling (e.g. generating basis functions based on binned values, specifying monotonicity of certain terms, interactions between groups of variables). The formula_hal function essentially converts the formula into the matching basis_list. Higher order Hal (and some screening stuff) is also implemented in this clone. Though, as a heads up, I haven't yet extensively tested these features.

@nhejazi
Copy link
Member

nhejazi commented Sep 5, 2020

These sound like great improvements @Larsvanderlaan. Let's try to set up a time to see how we can get these new features tested and merged into hal9001, if there's time in the next week or two? I think #67 also needed to get merged if I recall correctly

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

3 participants