sparse-lm

sparse-lm: Sparse linear regression models in Python - Published in JOSS (2023)

https://github.com/cedergrouphub/sparse-lm

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

cluster-expansion ising-model lattice-gas materials-science monte-carlo statistical-mechanics mesh hydrology energy-system exoplanet

Scientific Fields

Economics Social Sciences - 40% confidence
Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Sparse Linear Regression Models

Basic Info
Statistics
  • Stars: 19
  • Watchers: 3
  • Forks: 6
  • Open Issues: 5
  • Releases: 9
Created over 3 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License

README.md

Sparse Linear Regression Models

test Codacy Badge pre-commit.ci status pypi version Static Badge DOI

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

JOSS Publication

sparse-lm: Sparse linear regression models in Python
Published
December 21, 2023
Volume 8, Issue 92, Page 5867
Authors
Luis Barroso-Luque ORCID
Materials Sciences Division, Lawrence Berkeley National Laboratory, Berkeley CA, 94720, USA, Department of Materials Science and Engineering, University of California Berkeley, Berkeley CA, 94720, USA
Fengyu Xie ORCID
Materials Sciences Division, Lawrence Berkeley National Laboratory, Berkeley CA, 94720, USA, Department of Materials Science and Engineering, University of California Berkeley, Berkeley CA, 94720, USA
Editor
Mehmet Hakan Satman ORCID
Tags
scikit-learn cvxpy linear regression regularization structured sparsity

GitHub 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

All Time
  • Total Commits: 497
  • Total Committers: 7
  • Avg Commits per committer: 71.0
  • Development Distribution Score (DDS): 0.201
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
enhancement (6) bug (2) dependencies (1) github_actions (1) documentation (1) tests (1)
Pull Request Labels
dependencies (63) github_actions (34) python (5) tests (1) breaking (1)

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

  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 64 Last month
Rankings
Dependent packages count: 4.8%
Average: 15.5%
Downloads: 20.0%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/release.yml actions
  • 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
.github/workflows/test.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codacy/codacy-coverage-reporter-action v1 composite
.github/workflows/update-precommit.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peter-evans/create-pull-request v4.2.3 composite
pyproject.toml pypi
  • cvxopt *
  • cvxpy >=1.2
  • joblib *
  • numpy >=1.23
  • scikit-learn >=1.2
  • scipy >=1.9
src/requirements.txt pypi
  • cvxpy *
  • joblib *
  • numpy *
  • scikit-learn *
  • scipy *