sparse-lm
sparse-lm: Sparse linear regression models in Python - Published in JOSS (2023)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
3 of 7 committers (42.9%) from academic institutions -
✓Institutional organization owner
Organization cedergrouphub has institutional domain (ceder.berkeley.edu) -
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords from Contributors
Scientific Fields
Repository
Sparse Linear Regression Models
Basic Info
- Host: GitHub
- Owner: CederGroupHub
- License: other
- Language: Python
- Default Branch: main
- Homepage: https://cedergrouphub.github.io/sparse-lm
- Size: 11.9 MB
Statistics
- Stars: 19
- Watchers: 3
- Forks: 6
- Open Issues: 5
- Releases: 9
Metadata Files
README.md

Sparse Linear Regression Models
sparse-lm includes several (structured) sparse linear regression estimators that are absent in the
sklearn.linear_model module. The estimators in sparse-lm are designed to fit right into
scikit-learn, but the underlying optimization problem is expressed and
solved by leveraging cvxpy.
Available regression models
- Lasso, Group Lasso, Overlap Group Lasso, Sparse Group Lasso & Ridged Group Lasso.
- Adaptive versions of Lasso, Group Lasso, Overlap Group Lasso, Sparse Group Lasso & Ridged Group Lasso.
- Best Subset Selection, Ridged Best Subset, L0, L1L0 & L2L0 (all with optional grouping of parameters)
Installation
sparse-lm is available on PyPI, and can be installed via pip:
bash
pip install sparse-lm
Additional information on installation can be found the documentation here.
Basic usage
If you already use scikit-learn, using sparse-lm will be very easy. Just use any model like you would any linear model in scikit-learn:
```python import numpy as np from sklearn.datasets import makeregression from sklearn.modelselection import GridSearchCV from sparselm.model import AdaptiveLasso
X, y = makeregression(nsamples=100, nfeatures=80, ninformative=10, randomstate=0) alasso = AdaptiveLasso(fitintercept=False) param_grid = {'alpha': np.logspace(-8, 2, 10)}
cvsearch = GridSearchCV(alasso, paramgrid) cvsearch.fit(X, y) print(cvsearch.bestparams_) ```
For more details on use and functionality have a look at the examples and API sections of the documentation.
Contributing
We welcome any contributions that you think may improve the package! Please have a look at the contribution guidelines in the documentation.
Owner
- Name: Ceder Group
- Login: CederGroupHub
- Kind: organization
- Website: http://ceder.berkeley.edu/
- Repositories: 19
- Profile: https://github.com/CederGroupHub
JOSS Publication
sparse-lm: Sparse linear regression models in Python
Authors
Tags
scikit-learn cvxpy linear regression regularization structured sparsityGitHub Events
Total
- Watch event: 6
- Push event: 34
- Pull request event: 2
Last Year
- Watch event: 6
- Push event: 34
- Pull request event: 2
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| lbluque | l****e@b****u | 397 |
| Izzy Xie | 6****6@q****m | 43 |
| dependabot[bot] | 4****] | 33 |
| pre-commit-ci[bot] | 6****] | 16 |
| Ronald Kam | k****d@b****u | 5 |
| Peichen Zhong | z****c@b****u | 2 |
| tchen0965 | t****5@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 13
- Total pull requests: 102
- Average time to close issues: about 2 months
- Average time to close pull requests: 17 days
- Total issue authors: 5
- Total pull request authors: 6
- Average comments per issue: 1.69
- Average comments per pull request: 0.28
- Merged pull requests: 78
- Bot issues: 1
- Bot pull requests: 71
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 7 days
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.25
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
- qchempku2017 (7)
- lbluque (3)
- joannagiemza (1)
- kamronald (1)
- dependabot[bot] (1)
Pull Request Authors
- dependabot[bot] (38)
- github-actions[bot] (25)
- lbluque (20)
- pre-commit-ci[bot] (13)
- qchempku2017 (10)
- jbytecode (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 64 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 9
- Total maintainers: 1
pypi.org: sparse-lm
Sparse linear regression models
- Documentation: https://sparse-lm.readthedocs.io/
- License: BSD 3-Clause License
-
Latest release: 0.5.2
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peaceiris/actions-gh-pages v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/create-release v1 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- peaceiris/actions-gh-pages v3 composite
- pypa/cibuildwheel v2.12.0 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codacy/codacy-coverage-reporter-action v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peter-evans/create-pull-request v4.2.3 composite
- cvxopt *
- cvxpy >=1.2
- joblib *
- numpy >=1.23
- scikit-learn >=1.2
- scipy >=1.9
- cvxpy *
- joblib *
- numpy *
- scikit-learn *
- scipy *
