| Title: | Stability Plots for Lasso Stability Selection |
|---|---|
| Description: | Provides stability selection with Lasso and two diagnostic plots for assessing selection stability. The Regustab plot shows stability across the regularisation parameter grid, while the Convstab plot shows stability as a function of the number of subsamples. Methods are described in Nouraie and Muller (2026) <doi:10.1080/03610926.2026.2715517>. |
| Authors: | Mahdi Nouraie [aut, cre], Samuel Muller [aut] |
| Maintainer: | Mahdi Nouraie <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-09-29 08:52:07 UTC |
| Source: | https://github.com/mahdinouraie/stabplot |
Provides two diagnostic plots for assessing stability selection with Lasso. The 'Regustab' function plots stability values across the regularisation parameter grid, supporting regularisation tuning based on selection stability. It highlights and returns 'lambda.min', 'lambda.1se', and 'lambda.stable' when the maximum stability exceeds 0.75. Otherwise, it returns 'lambda.stable.1sd', defined using a one-standard-deviation criterion. The 'Convstab' function plots stability values against the number of subsamples to assess the convergence of the stability estimates and returns variables with selection frequencies exceeding a specified threshold, which defaults to 0.5.
Maintainer: Mahdi Nouraie [email protected]
Authors:
Samuel Muller
Nouraie, M., & Muller, S. (2026). Stability-guided hyper-parameter tuning for stability selection. Communications in Statistics - Theory and Methods, 1–19.
Meinshausen, N., & Bühlmann, P. (2010). Stability selection. Journal of the Royal Statistical Society Series B: Statistical Methodology, 72(4), 417-473.
Nogueira, S., Sechidis, K., & Brown, G. (2018). On the stability of feature selection algorithms. Journal of Machine Learning Research, 18(174), 1-54.
https://github.com/nogueirs/JMLR2018
Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology, 58(1), 267-288.
Creates a diagnostic plot of stability estimates and their confidence intervals across sequential subsamples in stability selection. The plot is constructed using 'lambda.stable' when the maximum stability exceeds 0.75; otherwise, 'lambda.stable.1sd' is used.
Convstab(x, y, B, alpha = 0.05, thr = 0.5)Convstab(x, y, B, alpha = 0.05, thr = 0.5)
x |
A numeric matrix of predictors. |
y |
A numeric vector of response values. |
B |
An integer specifying the number of subsamples. |
alpha |
A numeric value specifying the significance level for the confidence intervals. |
thr |
A numeric value specifying the minimum selection frequency for reporting selected variables. |
A list containing the stability plot ('plot') and a data frame of variables with selection frequencies exceeding 'thr' ('selected'), returned invisibly. The plot is also displayed as a side effect.
Nouraie, M., & Muller, S. (2026). Stability-guided hyper-parameter tuning for stability selection. Communications in Statistics - Theory and Methods, 1–19.
Meinshausen, N., & Bühlmann, P. (2010). Stability selection. Journal of the Royal Statistical Society Series B: Statistical Methodology, 72(4), 417-473.
Nogueira, S., Sechidis, K., & Brown, G. (2018). On the stability of feature selection algorithms. Journal of Machine Learning Research, 18(174), 1-54.
https://github.com/nogueirs/JMLR2018
Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology, 58(1), 267-288.
set.seed(123) x <- matrix(rnorm(1000), ncol = 10) # create beta based on the first 3 columns of x and some error beta <- c(0.5, 0.4, 0.3, rep(0, 7)) y <- x %*% beta + rnorm(100) B <- 200 res <- Convstab(x, y, B) # Example usage of the Convstab function res$selected # output # Variable Selection_Frequency # 1 x1 0.970 # 2 x2 0.895set.seed(123) x <- matrix(rnorm(1000), ncol = 10) # create beta based on the first 3 columns of x and some error beta <- c(0.5, 0.4, 0.3, rep(0, 7)) y <- x %*% beta + rnorm(100) B <- 200 res <- Convstab(x, y, B) # Example usage of the Convstab function res$selected # output # Variable Selection_Frequency # 1 x1 0.970 # 2 x2 0.895
Creates a diagnostic plot of stability values across the regularisation parameter grid for Lasso stability selection. The plot highlights 'lambda.min' and 'lambda.1se' from cross-validation, as well as 'lambda.stable' when the maximum stability exceeds 0.75. Otherwise, 'lambda.stable.1sd', defined using a one-standard-deviation criterion, is highlighted.
Regustab(x, y, B)Regustab(x, y, B)
x |
A numeric matrix of predictors. |
y |
A numeric vector of response values. |
B |
An integer specifying the number of subsamples. |
A list containing the selected regularisation values ('min', '1se', and either 'stable' or 'stable.1sd'), returned invisibly. A stability plot is also produced as a side effect.
Nouraie, M., & Muller, S. (2026). Stability-guided hyper-parameter tuning for stability selection. Communications in Statistics - Theory and Methods, 1–19.
Meinshausen, N., & Bühlmann, P. (2010). Stability selection. Journal of the Royal Statistical Society Series B: Statistical Methodology, 72(4), 417-473.
Nogueira, S., Sechidis, K., & Brown, G. (2018). On the stability of feature selection algorithms. Journal of Machine Learning Research, 18(174), 1-54.
https://github.com/nogueirs/JMLR2018
Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology, 58(1), 267-288.
set.seed(123) x <- matrix(rnorm(1000), ncol = 10) # create beta based on the first 3 columns of x and some error beta <- c(1, 2, 3, rep(0, 7)) y <- x %*% beta + rnorm(100) B <- 10 res <- Regustab(x, y, B) # Example usage of the Regustab function res # output # $min # [1] 0.07609021 # $`1se` # [1] 0.2550241 # $stable #[1] 0.3371269set.seed(123) x <- matrix(rnorm(1000), ncol = 10) # create beta based on the first 3 columns of x and some error beta <- c(1, 2, 3, rep(0, 7)) y <- x %*% beta + rnorm(100) B <- 10 res <- Regustab(x, y, B) # Example usage of the Regustab function res # output # $min # [1] 0.07609021 # $`1se` # [1] 0.2550241 # $stable #[1] 0.3371269