Skip to content

Commit

Permalink
docs: add some basic information on readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Dec 11, 2023
1 parent 866486e commit 8f4c4e0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
# sortedl1

**sortedl1** is a python package for Sorted L-One Penalized Estimation.

## Installing

sortedl1 is currently only available on github. To install it, run

```python
pip install -U git+https://github.com/jolars/sortedl1
```

# Usage

Estimators in **sortedl1** are compatible with the scikit-learn interface.

```python
import numpy as np
from numpy.random import default_rng

from sortedl1 import Slope

n = 100
p = 3

seed = 31
rng = default_rng(seed)

x = rng.standard_normal((n, p))
beta = rng.standard_normal(p)
y = x @ beta + rng.standard_normal(n)

model = Slope()
model.fit(x, y)

print(model.coef_)
```

## Contributing

The backbone of the package is written in C++ and developed in a separate repository at <https://github.com/jolars/libslope>. So if you have any issues with the package other than such that are specific to the python interface, please report them there. But feel free to request features here.

0 comments on commit 8f4c4e0

Please sign in to comment.