Code Monkey home page Code Monkey logo

sortedl1's Introduction

sortedl1

CI PyPI version codecov

sortedl1 is a python package for Sorted L-One Penalized Estimation (SLOPE).

Installing

The current release can be installed from PyPI by running

pip install sortedl1

You can also install the latest development version via pip by calling

pip install git+https://github.com/jolars/sortedl1

Alternatively, you can clone the repository and install the package locally by running

pip install .

Installing from source requires a C++17 compatible compiler.

Usage

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

import numpy as np
from numpy.random import default_rng

from sortedl1 import Slope

# Generate some random data
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)

# Fit the model
model = Slope(alpha=0.1)
model.fit(x, y)

# Print the coefficients
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.

When writing commit messages, please use the conventional commits format.

Versioning

sortedl1 uses semantic versioning.

sortedl1's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar jolars avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.