https://github.com/dewittpe/ensr
Elastic Net SearcheR
https://github.com/dewittpe/ensr
Last synced: 4 months ago
JSON representation
Elastic Net SearcheR
- Host: GitHub
- URL: https://github.com/dewittpe/ensr
- Owner: dewittpe
- Created: 2018-10-02T22:14:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-02T20:51:46.000Z (over 6 years ago)
- Last Synced: 2025-12-09T21:42:14.580Z (6 months ago)
- Language: R
- Homepage:
- Size: 2.87 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# ensr: Elastic Net SearcheR 
[](https://travis-ci.com/dewittpe/ensr)
[](https://cran.r-project.org/package=ensr)
[](http://www.r-pkg.org/pkg/ensr)
[](http://www.r-pkg.org/pkg/ensr)
Elastic Net regression models combine both the L1 and L2 penalties of lasso and
ridge regression. There are two penalty terms, lambda and alpha. Lambda is a
complexity parameter and alpha is a balance between lasso and ridge.
The `cv.glmnet` function in [`glmnet`](https://cran.r-project.org/package=glmnet)
will perform cross validation to find the value of lambda for a given value of
alpha. `cv.glmnet` does not search over values of alpha. The ensr package
builds a grid of alpha and lambda values and, using cross-validation, suggests
preferable values for both lambda and alpha.
After installing this package we encourage you to read the vignette to see
examples.
```r
vignette("ensr-examples", package = "ensr")
```
## Installing ensr
ensr is on [CRAN](https://cran.r-project.org/package=ensr).
```r
install.packages('ensr', repos = 'https://cran.rstudio.com')
```
Install the development version from github:
```r
if ('remotes' %in% rownames(installed.packages())) {
install.packages('remotes', repos = "https://cran.rstudio.com")
}
remotes::install_github("dewittpe/ensr", build_opts = c("--no-resave-data"))
```
## Development version from Github
There are several ways you can install ensr. If you are working on a Windows
machine you will need to have [Rtools](https://cran.r-project.org/bin/windows/Rtools/) installed.
### Clone and Install
There are detailed instructions for cloning the repo in the `CONTRIBUTING.md`
file. After cloning use the makefile to build, check, and install the ensr
package, e.g.,
make install
## Contributing
Please read the `CONTRIBUTING.md` file. There are details on the how to clone
the repo and the structure of this package.