-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathREADME.Rmd
More file actions
104 lines (75 loc) · 2.78 KB
/
Copy pathREADME.Rmd
File metadata and controls
104 lines (75 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.align = "center",
fig.width = 5
)
```
# SLOPE <a href="https://jolars.github.io/SLOPE/"><img src='man/figures/logo.png' align="right" height="139" /></a>
<!-- badges: start -->
[](https://github.com/jolars/SLOPE/actions)
[](https://CRAN.R-project.org/package=SLOPE)
[](https://app.codecov.io/gh/jolars/SLOPE)
[](https://doi.org/10.5281/zenodo.17475845)
<!-- badges: end -->
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](https://cran.r-project.org/) with the following command:
```{r}
#| eval: false
install.packages("SLOPE")
```
Alternatively, you can install the development version from
[GitHub](https://github.com/) with the following command:
```{r}
#| eval: false
# 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.
```{r}
library(SLOPE)
fit <- SLOPE(heart$x, heart$y, family = "binomial")
```
We can plot the resulting regularization path:
```{r}
plot(fit)
```
We can also perform cross-validation to select optimal scaling of
the regularization sequence:
```{r}
set.seed(18)
cvfit <- cvSLOPE(heart$x, heart$y, family = "binomial")
plot(cvfit)
```
## Ecosystem
SLOPE is also available as a
- Python package: [sortedl1](https://pypi.org/project/sortedl1/)
- Julia package: [SLOPE.jl](https://github.com/jolars/SLOPE.jl)
- C++ library: [libslope](https://github.com/jolars/libslope)
## Versioning
SLOPE uses [semantic versioning](https://semver.org).
## Code of conduct
Please note that the 'SLOPE' project is released with a
[Contributor Code of Conduct](https://jolars.github.io/SLOPE/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.