https://github.com/tlverse/hal9001
🤠📿 The Highly Adaptive Lasso
https://github.com/tlverse/hal9001
cross-validation lasso-regression machine-learning-algorithms nonparametric-regression
Last synced: 3 months ago
JSON representation
🤠📿 The Highly Adaptive Lasso
- Host: GitHub
- URL: https://github.com/tlverse/hal9001
- Owner: tlverse
- License: gpl-3.0
- Created: 2017-08-15T20:43:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T20:00:18.000Z (over 1 year ago)
- Last Synced: 2026-01-28T16:37:40.266Z (4 months ago)
- Topics: cross-validation, lasso-regression, machine-learning-algorithms, nonparametric-regression
- Language: R
- Homepage: https://tlverse.org/hal9001
- Size: 13.1 MB
- Stars: 49
- Watchers: 4
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
---
output:
rmarkdown::github_document
bibliography: "inst/REFERENCES.bib"
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# R/`hal9001`
[](https://github.com/tlverse/hal9001/actions)
[](https://app.codecov.io/gh/tlverse/hal9001)
[](https://www.r-pkg.org/pkg/hal9001)
[](https://CRAN.R-project.org/package=hal9001)
[](https://CRAN.R-project.org/package=hal9001)
[](https://www.repostatus.org/#active)
[](http://www.gnu.org/licenses/gpl-3.0)
[](https://doi.org/10.5281/zenodo.3558313)
[](https://doi.org/10.21105/joss.02526)
> The _Scalable_ Highly Adaptive Lasso
__Authors:__ [Jeremy Coyle](https://github.com/tlverse), [Nima
Hejazi](https://nimahejazi.org), [Rachael
Phillips](https://github.com/rachaelvp), [Lars van der
Laan](https://github.com/Larsvanderlaan), and [Mark van der
Laan](https://vanderlaan-lab.org/)
---
## What's `hal9001`?
`hal9001` is an R package providing an implementation of the scalable _highly
adaptive lasso_ (HAL), a nonparametric regression estimator that applies
L1-regularized lasso regression to a design matrix composed of indicator
functions corresponding to the support of the functional over a set of
covariates and interactions thereof. HAL regression allows for arbitrarily
complex functional forms to be estimated at fast (near-parametric) convergence
rates under only global smoothness assumptions [@vdl2017generally;
@bibaut2019fast]. For detailed theoretical discussions of the highly adaptive
lasso estimator, consider consulting, for example, @vdl2017generally,
@vdl2017finite, and @vdl2017uniform. For a computational demonstration of the
versatility of HAL regression, see @benkeser2016hal. Recent theoretical works
have demonstrated success in building efficient estimators of complex
parameters when particular variations of HAL regression are used to estimate
nuisance parameters [e.g., @vdl2019efficient; @ertefaie2020nonparametric].
---
## Installation
For standard use, we recommend installing the package from
[CRAN](https://CRAN.R-project.org/package=hal9001) via
```{r cran-installation, eval = FALSE}
install.packages("hal9001")
```
To contribute, install the _development version_ of `hal9001` from GitHub via
[`remotes`](https://CRAN.R-project.org/package=remotes):
```{r gh-master-installation, eval = FALSE}
remotes::install_github("tlverse/hal9001")
```
---
## Issues
If you encounter any bugs or have any specific feature requests, please [file an
issue](https://github.com/tlverse/hal9001/issues).
---
## Example
Consider the following minimal example in using `hal9001` to generate
predictions via Highly Adaptive Lasso regression:
```{r example}
# load the package and set a seed
library(hal9001)
set.seed(385971)
# simulate data
n <- 100
p <- 3
x <- matrix(rnorm(n * p), n, p)
y <- x[, 1] * sin(x[, 2]) + rnorm(n, mean = 0, sd = 0.2)
# fit the HAL regression
hal_fit <- fit_hal(X = x, Y = y, yolo = TRUE)
hal_fit$times
# training sample prediction
preds <- predict(hal_fit, new_data = x)
mean(hal_mse <- (preds - y)^2)
```
---
## Contributions
Contributions are very welcome. Interested contributors should consult our
[contribution
guidelines](https://github.com/tlverse/hal9001/blob/master/CONTRIBUTING.md)
prior to submitting a pull request.
---
## Citation
After using the `hal9001` R package, please cite both of the following:
@software{coyle2022hal9001-rpkg,
author = {Coyle, Jeremy R and Hejazi, Nima S and Phillips, Rachael V
and {van der Laan}, Lars and {van der Laan}, Mark J},
title = {{hal9001}: The scalable highly adaptive lasso},
year = {2022},
url = {https://doi.org/10.5281/zenodo.3558313},
doi = {10.5281/zenodo.3558313}
note = {{R} package version 0.4.2}
}
@article{hejazi2020hal9001-joss,
author = {Hejazi, Nima S and Coyle, Jeremy R and {van der Laan}, Mark
J},
title = {{hal9001}: Scalable highly adaptive lasso regression in
{R}},
year = {2020},
url = {https://doi.org/10.21105/joss.02526},
doi = {10.21105/joss.02526},
journal = {Journal of Open Source Software},
publisher = {The Open Journal}
}
---
## License
© 2017-2024 [Jeremy Coyle](https://github.com/tlverse) and [Nima
Hejazi](https://nimahejazi.org)
The contents of this repository are distributed under the GPL-3 license. See
file `LICENSE` for details.
---
## References