tlverse / hal9001

🤠 📿 The Highly Adaptive Lasso
https://tlverse.org/hal9001
GNU General Public License v3.0
49 stars 15 forks source link

Hal9001KthOrderAndScreening #67

Closed Larsvanderlaan closed 4 years ago

Larsvanderlaan commented 4 years ago

This version of hal9001 has implemented support for kth order Hal. The primarily changes are in the make_basis.R and make_basis.cpp files, as well as some minor changes in the predict.R and hal.R files. As a note, the check for duplicate basis functions seems to only work for 0-order Hal as it leads to odd behavior when used for k-th order Hal. As a result, I disabled this check if the nonzero order is specified.

Other additional features added (which may not be something you want to add to hal9001) are a formula function for hal9001 that allows users to specify the functional form of the hal fit in an intuitive and flexible way, including monotonicity of main/interaction terms (see formula_hal9001). Additionally, an aggressive screening algorithm has been implemented (rough code) for both main term and interaction basis functions (see screening_basis_hal).

This is a copy of another repo of mine so feel free to edit as desired.