Learn R Programming

easy.glmnet (version 1.0)

Functions to Simplify the Use of 'glmnet' for Machine Learning

Description

Provides several functions to simplify using the 'glmnet' package: converting data frames into matrices ready for 'glmnet'; b) imputing missing variables multiple times; c) fitting and applying prediction models straightforwardly; d) assigning observations to folds in a balanced way; e) cross-validate the models; f) selecting the most representative model across imputations and folds; and g) getting the relevance of the model regressors; as described in several publications: Solanes et al. (2022) , Palau et al. (2023) , Sobregrau et al. (2024) .

Copy Link

Version

Install

install.packages('easy.glmnet')

Monthly Downloads

160

Version

1.0

License

GPL-3

Maintainer

Joaquim Radua

Last Published

September 11th, 2024

Functions in easy.glmnet (1.0)

assign.folds

Assign observations to folds in a balanced way
glmnet_get.main.model

Get the main glmnet model across imputations and folds
surv2binary

Convert a "Surv" object into binary variables at different time points
glmnet_fit

Obtain and use a glmnet prediction model
impute.glmnet.matrix_fit

Impute missing variables in a glmnet matrix multiple times
cv

Conduct cross-validation
data.frame2glmnet.matrix

Convert a data.frame into a matrix ready for glmnet
glmnet_get.items.relevance

Get the relevance of the model items