Skip to main content

A fast algorithm with dual extrapolation for sparse problems

Project description

celer

build coverage License Downloads Downloads PyPI version

celer is a Python package that solves Lasso-like problems and provides estimators that follow the scikit-learn API. Thanks to a tailored implementation, celer provides a fast solver that tackles large-scale datasets with millions of features up to 100 times faster than scikit-learn.

Currently, the package handles the following problems:

Problem Support Weights Native cross-validation
Lasso
ElasticNet
Group Lasso
Multitask Lasso
Sparse Logistic regression

If you are interested in other models, such as non convex penalties (SCAD, MCP), sparse group lasso, group logistic regression, Poisson regression, Tweedie regression, have a look at our companion package skglm

Cite

celer is licensed under the BSD 3-Clause. Hence, you are free to use it. If you do so, please cite:

@InProceedings{pmlr-v80-massias18a,
  title     = {Celer: a Fast Solver for the Lasso with Dual Extrapolation},
  author    = {Massias, Mathurin and Gramfort, Alexandre and Salmon, Joseph},
  booktitle = {Proceedings of the 35th International Conference on Machine Learning},
  pages     = {3321--3330},
  year      = {2018},
  volume    = {80},
}

@article{massias2020dual,
  author  = {Mathurin Massias and Samuel Vaiter and Alexandre Gramfort and Joseph Salmon},
  title   = {Dual Extrapolation for Sparse GLMs},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {234},
  pages   = {1-33},
  url     = {http://jmlr.org/papers/v21/19-587.html}
}

Why celer?

celer is specially designed to handle Lasso-like problems which makes it a fast solver of such problems. In particular, it comes with tools such as:

  • automated parallel cross-validation
  • support of sparse and dense data
  • optional feature centering and normalization
  • unpenalized intercept fitting

celer also provides easy-to-use estimators as it is designed under the scikit-learn API.

Get started

To get started, install celer via pip

pip install -U celer

On your python console, run the following commands to fit a Lasso estimator on a toy dataset.

>>> from celer import Lasso
>>> from celer.datasets import make_correlated_data
>>> X, y, _ = make_correlated_data(n_samples=100, n_features=1000)
>>> estimator = Lasso()
>>> estimator.fit(X, y)

This is just a starter example. Make sure to browse celer documentation to learn more about its features. To get familiar with celer API, you can also explore the gallery of examples which includes examples on real-life datasets as well as timing comparisons with other solvers.

Contribute to celer

celer is an open-source project and hence relies on community efforts to evolve. Your contribution is highly valuable and can come in three forms

  • bug report: you may encounter a bug while using celer. Don't hesitate to report it on the issue section.
  • feature request: you may want to extend/add new features to celer. You can use the issue section to make suggestions.
  • pull request: you may have fixed a bug, enhanced the documentation, ... you can submit a pull request and we will respond asap.

For the last mean of contribution, here are the steps to help you setup celer on your local machine:

  1. Fork the repository and afterwards run the following command to clone it on your local machine
git clone https://github.com/{YOUR_GITHUB_USERNAME}/celer.git
  1. cd to celer directory and install it in edit mode by running
cd celer
pip install -e .
  1. To run the gallery examples and build the documentation, run the following
cd doc
pip install -e .[doc]
make html

Further links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celer-0.7.4.tar.gz (47.3 kB view details)

Uploaded Source

Built Distributions

celer-0.7.4-cp313-cp313-win_amd64.whl (746.2 kB view details)

Uploaded CPython 3.13Windows x86-64

celer-0.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

celer-0.7.4-cp313-cp313-macosx_11_0_arm64.whl (813.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

celer-0.7.4-cp312-cp312-win_amd64.whl (747.5 kB view details)

Uploaded CPython 3.12Windows x86-64

celer-0.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

celer-0.7.4-cp312-cp312-macosx_11_0_arm64.whl (819.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

celer-0.7.4-cp311-cp311-win_amd64.whl (748.8 kB view details)

Uploaded CPython 3.11Windows x86-64

celer-0.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

celer-0.7.4-cp311-cp311-macosx_11_0_arm64.whl (814.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

celer-0.7.4-cp310-cp310-win_amd64.whl (746.1 kB view details)

Uploaded CPython 3.10Windows x86-64

celer-0.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

celer-0.7.4-cp310-cp310-macosx_11_0_arm64.whl (815.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file celer-0.7.4.tar.gz.

File metadata

  • Download URL: celer-0.7.4.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for celer-0.7.4.tar.gz
Algorithm Hash digest
SHA256 2e3e65b5218eb2455155f3c54d2c6b33b486fd113b67fbe1f31723fe1ec14363
MD5 cfb8d57fc85f216952c1373e1d7ab289
BLAKE2b-256 decd094d08cf59158a7f180020778096b4b1b36cfa843218681134fc7112508d

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: celer-0.7.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 746.2 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for celer-0.7.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 43e0c7111b69a545905e8e6bfa14caef5e0a9950e0336971f556b81c98a7eb03
MD5 a0b273b6808409b9745ce81da7ee390f
BLAKE2b-256 20ac333995e5edf7627eee93d1531e368cb2eb03977a3d8b0e2a1c3caa5d15cf

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b06e1811481ef1b9b740cecd2c5dbe91931e8891a1adfd33c2f5317b9653ea0c
MD5 685adbf2dc6093b6fbc80cf169709473
BLAKE2b-256 3e51d460992bf50b2657bf525f855fdba91207eff09ae2f06cae70095b9bc4eb

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c3acb08acc9e03b51ef98d4997fb20be7e627d2e49d4b6c00b5fa63ad401532
MD5 e0031e51c95db5734a7e7782376db782
BLAKE2b-256 86fec91f40a1969c3780408e55d0cf20e19f12d20281ce8e064aeed0a1aedfc7

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: celer-0.7.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 747.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for celer-0.7.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d87ba7fe9461b9a01c373a5f6cd0e058c690a168a6749b78ebdf7f81ca12f9e6
MD5 d4bdd960f1c974613479fb210d933323
BLAKE2b-256 0224f99dce9e5e8c8a11ceb16684603c6b6d79511e041ceb80c9c58de32cd6d6

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc6c07cff0a1e9934bbaca6b053a4e881c173aa0557cfe55b27a1d056a266e23
MD5 c0a57e43a5e298f4757237d6be007170
BLAKE2b-256 45a037594a1c6f4f5e0f27b53f80cf3c76e3fda19ef34ce93708c6e413339294

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d91b3e7ba5e9753a70a63d994c8ace07154ad9ec5ac01ac59c15c44fb923f61
MD5 d889ae2c8bb6cce486860f64f5e8eebe
BLAKE2b-256 a38cdc2946e87035e62094bfc6b4a0b9c169748658f214c1327deefa469f8e1c

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: celer-0.7.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 748.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for celer-0.7.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a1f82760f897131b13f7c75e01b76ef2ff4f0579e6e814cb591f792cc5cad92d
MD5 a34834895f487b0dd5f58797903f1475
BLAKE2b-256 f9af778dc26c6622e75a59315f59ab21b4552ef3b4c35a93f52d22ef8106b024

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 038230f6f8ea6b32bd6beba0855f5d734ef3d36d9fd3b50cbfd55de8767e1916
MD5 64966f7321ffbedec7c25c7b16e4f698
BLAKE2b-256 a43c49f1b53504a988ce9c67daf79ce09307d36fe34fba569d8bad904415b53e

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e69c96c6c945ec8bf95d13d80a9611aebbe5295c1519847a41adba2ab0cb10c9
MD5 953b4d5f195f8ae32788d941de268f5d
BLAKE2b-256 e2ecc63b192bfde0798741c4c173ee76f2c87b1f01ace8659bdd3406c3c144dd

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: celer-0.7.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 746.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for celer-0.7.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a1c5cf967872fb67ee83232fa6935743adf03a6d103746d045ca5c7e45f267d4
MD5 1dafe8d2bbbb69b96f7c94c064f2bca9
BLAKE2b-256 2a786d25291f12fe6c5dbc648b7e06b7d553bfe43eb13ebe392e5b3f36b11359

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3fd8882c3c4861f21a1597379dcf97a830e40aa51d8e0ea01b09ab564dd647e
MD5 f76584f1b9d1a32eb881f8d4b7ab5c3d
BLAKE2b-256 8205dee9b0397967648ed590ecc1d2b6685c51677d38ce55a199a911a0e324e6

See more details on using hashes here.

File details

Details for the file celer-0.7.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for celer-0.7.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0331c865bed153e6da5111797b2c10c1b6c6746610a412e45dac5c3bfa93e9e8
MD5 dfca765ff3744d8c2588ea83d27b1d7b
BLAKE2b-256 8658f9cc62dac0de3ed8ad74e928ecbef4ab9d2d357a290b2252b975d216312e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page