Automated Penalized Regression Analysis Using Ridge, Lasso and Elastic Net

Provides an automated framework for penalized regression analysis using Ridge Regression, Lasso Regression and Elastic Net Regression. The package performs data standardization, training-testing data partitioning, cross-validation for hyperparameter tuning, model fitting, coefficient estimation, variable importance assessment, prediction, and performance evaluation. It simplifies regularized regression analysis by integrating the complete modeling workflow into a single function suitable for researchers for better understanding of the data.The methods are based on Hoerl and Kennard (1970) , Zou and Hastie (2005) , and Friedman et al. (2010) .


PenalReg

PenalReg is an R package for automated penalized regression analysis using Ridge Regression, Lasso Regression, and Elastic Net Regression.

Installation

install.packages("PenalReg")

Example

library(PenalReg)

data(mtcars)

mtcars_subset <- data.frame( mpg = mtcars$mpg, cyl = mtcars$cyl, disp = mtcars$disp, hp = mtcars$hp, drat = mtcars$drat, wt = mtcars$wt, qsec = mtcars$qsec, gear = mtcars$gear, carb = mtcars$carb

fit <- PenalReg( data = mtcars_subset, response = "mpg", cv = 5, verbose = FALSE )

fit

Common Warnings

Warning

There were missing values in resampled performance measures.

This warning is generated by the underlying caret package during cross-validation. It may occur when:

  • the dataset contains relatively few observations,
  • the hyperparameter search grid is extensive,
  • some tuning parameter combinations fail to produce valid performance estimates.

The warning does not necessarily indicate that the analysis has failed. The best-performing model is selected from the successfully evaluated parameter combinations.

To reduce the likelihood of this warning:

  • use fewer cross-validation folds for small datasets,
  • use a smaller or logarithmically spaced lambda grid,
  • remove predictors with near-zero variance,
  • ensure the dataset contains no missing values.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("PenalReg")

0.1.0 by S. Vishnu Shankar, a month ago


Browse source code at https://github.com/cran/PenalReg


Authors: S. Vishnu Shankar [aut, cre] , V. Lavanya [aut] , Santosha Rathod [aut] , Mrinmoy Ray [aut] , Anil Kumar [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports caret, stats, utils

Suggests glmnet


See at CRAN