dfr

Repository for the dfr R package, which fits the sparse-group lasso using DFR.

https://github.com/ff1201/dfr

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, springer.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Repository for the dfr R package, which fits the sparse-group lasso using DFR.

Basic Info
  • Host: GitHub
  • Owner: ff1201
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 136 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

dfr

CRAN status CRAN status CRAN downloads this month

Implementation of the Dual Feature Reduction (DFR) approach for the Sparse Group Lasso (SGL) and the Adaptive Sparse Group Lasso (aSGL). The DFR approach is a feature reduction approach that applies strong screening to reduce the feature space before optimisation, leading to speed-up improvements for fitting SGL models. DFR is implemented using the Adaptive Three Operator Splitting (ATOS) algorithm, with linear and logistic SGL models supported, both of which can be fit using k-fold cross-validation. Dense and sparse input matrices are supported.

A detailed description of DFR can be found in Feser, F., Evangelou, M. (2024). "Dual feature reduction for the sparse-group lasso and its adaptive variant".

SGL was proposed in Simon, N., Friedman, J., Hastie, T., Tibshirani, R. (2013). "A Sparse-Group Lasso".

The adaptive SGL is described in Mendez-Civieta, A., Carmen Aguilera-Morillo, M., Lillo, R. (2020). "Adaptive sparse group LASSO in quantile regression" and Poignard, B. (2020). "Asymptotic theory of the adaptive Sparse Group Lasso".

Installation

You can install the current stable release from CRAN with r install.packages("dfr") Your R configuration must allow for a working Rcpp. To install a develop the development version from GitHub run r library(devtools) install_github("ff1201/dfr")

Example

The code for fitting a basic DFR-SGL model is:

``` r library(dfr) groups = c(rep(1:20, each=3), rep(21:40, each=4), rep(41:60, each=5), rep(61:80, each=6), rep(81:100, each=7))

data = sgs::gentoydata(p=500, n=400, groups = groups, seed_id=3)

model = dfr_sgl(X = data$X, y = data$y, groups = groups, alpha = 0.95) ```

where X is the input matrix, y the response vector, groups a vector containing indices for the groups of the predictors, and alpha determines the convex balance between the lasso and group lasso.

The impact of screening can be seen by turning off the screening rules:

r no_screen = system.time(model <- dfr_sgl(X = data$X, y = data$y, groups = groups, alpha = 0.95,screen=FALSE)) screen = system.time(model_screen <- dfr_sgl(X = data$X, y = data$y, groups = groups, alpha = 0.95,screen=TRUE)) c(no_screen[3], screen[3]) For DFR-aSGL, run

``` r library(dfr) groups = c(rep(1:20, each=3), rep(21:40, each=4), rep(41:60, each=5), rep(61:80, each=6), rep(81:100, each=7))

data = sgs::gentoydata(p=500, n=400, groups = groups, seed_id=3)

model = dfradapsgl(X = data$X, y = data$y, groups = groups, alpha = 0.95, gamma1 = 0.1, gamma2 = 0.1) `` wheregamma1andgamma2` determine the shape of the adaptive penalties. Again, we can see the impact of screening

r no_screen = system.time(model <- dfr_adap_sgl(X = data$X, y = data$y, groups = groups, alpha = 0.95, gamma_1 = 0.1, gamma_2 = 0.1, screen=FALSE)) screen = system.time(model_screen <- dfr_adap_sgl(X = data$X, y = data$y, groups = groups, alpha = 0.95, gamma_1 = 0.1, gamma_2 = 0.1, screen=TRUE)) c(no_screen[3], screen[3])

Owner

  • Name: Fabio Feser
  • Login: ff1201
  • Kind: user
  • Location: London, UK
  • Company: Imperial College London

PhD student on the StatML programme at Imperial & Oxford

GitHub Events

Total
  • Issues event: 3
  • Push event: 6
Last Year
  • Issues event: 3
  • Push event: 6

Packages

  • Total packages: 1
  • Total downloads:
    • cran 264 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: dfr

Dual Feature Reduction for SGL

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 264 Last month
Rankings
Dependent packages count: 28.1%
Dependent repos count: 34.6%
Average: 49.8%
Downloads: 86.6%
Maintainers (1)
Last synced: 11 months ago