Learn R Programming

SLOPE

Efficient implementations for Sorted L-One Penalized Estimation (SLOPE): generalized linear models regularized with the sorted L1-norm.

Features

  • Gaussian (quadratic), binomial (logistic), multinomial logistic, and Poisson regression
  • Sparse and dense input matrices
  • Efficient hybrid coordinate descent algorithm
  • Predictor (feature) screening rules that speed up fitting in high-dimensional settings
  • Cross-validation
  • Parallelized routines
  • Duality-based stopping criteria for robust control of suboptimality

Installation

You can install the current stable release from CRAN with the following command:

install.packages("SLOPE")

Alternatively, you can install the development version from GitHub with the following command:

# install.packages("pak")
pak::pak("jolars/SLOPE")

Getting Started

By default, SLOPE fits a full regularization path to the given data. Here is an example of fitting a logistic SLOPE model to the built-in heart dataset.

library(SLOPE)

fit <- SLOPE(heart$x, heart$y, family = "binomial")

We can plot the resulting regularization path:

plot(fit)

We can also perform cross-validation to select optimal scaling of the regularization sequence:

set.seed(18)

cvfit <- cvSLOPE(heart$x, heart$y, family = "binomial")
plot(cvfit)

Ecosystem

SLOPE is also available as a

Versioning

SLOPE uses semantic versioning.

Code of conduct

Please note that the ‘SLOPE’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('SLOPE')

Monthly Downloads

770

Version

2.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Larsson

Last Published

January 28th, 2026

Functions in SLOPE (2.0.0)

interpolatePenalty

Interpolate Penalty Values
plotDiagnostics

Plot Results from Diagnostics Collected During Model Fitting
predict.SLOPE

Generate Predictions from SLOPE Models
print.SLOPE

Print Results from SLOPE Fit
print.summary_SLOPE

Print Summary of SLOPE Model
summary.TrainedSLOPE

Summarize TrainedSLOPE Model
trainSLOPE

Train a SLOPE Model
score

Compute One of Several Loss Metrics on a New Data Set
sortedL1Prox

Sorted L1 Proximal Operator
regularizationWeights

Generate Regularization (Penalty) Weights for SLOPE
summary.SLOPE

Summarize SLOPE Model
refit

Refit SLOPE Model with Optimal Parameters
interpolateCoefficients

Interpolate Coefficients
student

Student Performance
wine

Wine Cultivars
setup_diagnostics

Setup a data.frame of Diagnostics
abalone

Abalone
SLOPE

Sorted L-One Penalized Estimation
coef.SLOPE

Obtain Coefficients
cvSLOPE

Tune SLOPE with Cross-Validation
deviance.SLOPE

Model Deviance
print.summary_TrainedSLOPE

Print Summary of TrainedSLOPE Model
plotClusters

Plot Cluster Structure
plot.SLOPE

Plot Coefficients
plot.TrainedSLOPE

Plot Results from Cross-Validation
createFolds

Create Cross-Validation Folds
bodyfat

Bodyfat
heart

Heart Disease
glioma

Glioma Metabolomics
SLOPE-package

SLOPE: Sorted L1 Penalized Estimation