{"id":13689340,"url":"https://github.com/glm-tools/pyglmnet","last_synced_at":"2026-02-18T09:42:38.478Z","repository":{"id":44550217,"uuid":"55302570","full_name":"glm-tools/pyglmnet","owner":"glm-tools","description":"Python implementation of elastic-net regularized generalized linear models","archived":false,"fork":false,"pushed_at":"2023-08-17T17:49:07.000Z","size":7667,"stargazers_count":287,"open_issues_count":39,"forks_count":84,"subscribers_count":12,"default_branch":"master","last_synced_at":"2026-02-05T15:42:25.397Z","etag":null,"topics":["data-science","elastic-net","glm","lasso","machine-learning","python"],"latest_commit_sha":null,"homepage":"http://glm-tools.github.io/pyglmnet/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glm-tools.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json"}},"created_at":"2016-04-02T15:46:24.000Z","updated_at":"2025-12-18T23:37:01.000Z","dependencies_parsed_at":"2022-09-10T19:41:32.001Z","dependency_job_id":"7d3a93c9-4c42-4a10-998b-a6fc16ee32cd","html_url":"https://github.com/glm-tools/pyglmnet","commit_stats":{"total_commits":736,"total_committers":32,"mean_commits":23.0,"dds":0.5978260869565217,"last_synced_commit":"9339c5c71c908ec31cf4bebda5d9fe47dfed4f1c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/glm-tools/pyglmnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glm-tools%2Fpyglmnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glm-tools%2Fpyglmnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glm-tools%2Fpyglmnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glm-tools%2Fpyglmnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glm-tools","download_url":"https://codeload.github.com/glm-tools/pyglmnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glm-tools%2Fpyglmnet/sbom","scorecard":{"id":429932,"data":{"date":"2025-08-11","repo":{"name":"github.com/glm-tools/pyglmnet","commit":"9339c5c71c908ec31cf4bebda5d9fe47dfed4f1c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2020-107 / GHSA-jjw5-xxj6-pcv5","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2020-108","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:05:56.457Z","repository_id":44550217,"created_at":"2025-08-19T03:05:56.457Z","updated_at":"2025-08-19T03:05:56.457Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29329556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","elastic-net","glm","lasso","machine-learning","python"],"created_at":"2024-08-02T15:01:44.145Z","updated_at":"2026-02-18T09:42:33.468Z","avatar_url":"https://github.com/glm-tools.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"pyglmnet\n========\n\nA python implementation of elastic-net regularized generalized linear models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|License| |Travis| |Codecov| |Circle| |Gitter| |DOI| |JOSS|\n\n`[Documentation (stable version)]`_ `[Documentation (development version)]`_\n\n.. image:: https://user-images.githubusercontent.com/15852194/67919367-70482600-fb76-11e9-9b86-891969bd2bee.jpg\n\n-  Pyglmnet provides a wide range of noise models (and paired canonical\n   link functions): ``'gaussian'``, ``'binomial'``, ``'probit'``,\n   ``'gamma'``, '``poisson``', and ``'softplus'``.\n\n-  It supports a wide range of regularizers: ridge, lasso, elastic net,\n   `group\n   lasso \u003chttps://en.wikipedia.org/wiki/Proximal_gradient_methods_for_learning#Group_lasso\u003e`__,\n   and `Tikhonov\n   regularization \u003chttps://en.wikipedia.org/wiki/Tikhonov_regularization\u003e`__.\n\n-  We have implemented a cyclical coordinate descent optimizer with\n   Newton update, active sets, update caching, and warm restarts. This\n   optimization approach is identical to the one used in R package.\n\n-  A number of Python wrappers exist for the R glmnet package (e.g.\n   `here \u003chttps://github.com/civisanalytics/python-glmnet\u003e`__ and\n   `here \u003chttps://github.com/dwf/glmnet-python\u003e`__) but in contrast to\n   these, Pyglmnet is a pure python implementation. Therefore, it is\n   easy to modify and introduce additional noise models and regularizers\n   in the future.\n\nInstallation\n~~~~~~~~~~~~\n\nInstall the stable PyPI version with ``pip``\n\n.. code:: bash\n\n    $ pip install pyglmnet\n\nFor the bleeding edge development version:\n\nClone the repository.\n\n.. code:: bash\n\n    $ pip install https://api.github.com/repos/glm-tools/pyglmnet/zipball/master\n\nGetting Started\n~~~~~~~~~~~~~~~\n\n\nHere is an example on how to use the ``GLM`` estimator.\n\n.. code:: python\n\n    import numpy as np\n    import scipy.sparse as sps\n\n    import matplotlib.pyplot as plt\n    from pyglmnet import GLM, simulate_glm\n\n    n_samples, n_features = 1000, 100\n    distr = 'poisson'\n\n    # sample a sparse model\n    np.random.seed(42)\n    beta0 = np.random.rand()\n    beta = sps.random(1, n_features, density=0.2).toarray()[0]\n\n    # simulate data\n    Xtrain = np.random.normal(0.0, 1.0, [n_samples, n_features])\n    ytrain = simulate_glm('poisson', beta0, beta, Xtrain)\n    Xtest = np.random.normal(0.0, 1.0, [n_samples, n_features])\n    ytest = simulate_glm('poisson', beta0, beta, Xtest)\n\n    # create an instance of the GLM class\n    glm = GLM(distr='poisson', score_metric='pseudo_R2', reg_lambda=0.01)\n\n    # fit the model on the training data\n    glm.fit(Xtrain, ytrain)\n\n    # predict using fitted model on the test data\n    yhat = glm.predict(Xtest)\n\n    # score the model on test data\n    pseudo_R2 = glm.score(Xtest, ytest)\n    print('Pseudo R^2 is %.3f' % pseudo_R2)\n\n    # plot the true coefficients and the estimated ones\n    plt.stem(beta, markerfmt='r.', label='True coefficients')\n    plt.stem(glm.beta_, markerfmt='b.', label='Estimated coefficients')\n    plt.ylabel(r'$\\beta$')\n    plt.legend(loc='upper right')\n\n    # plot the true vs predicted label\n    plt.figure()\n    plt.plot(ytest, yhat, '.')\n    plt.xlabel('True labels')\n    plt.ylabel('Predicted labels')\n    plt.plot([0, ytest.max()], [0, ytest.max()], 'r--')\n    plt.show()\n\n`More pyglmnet examples and use\ncases \u003chttp://glm-tools.github.io/pyglmnet/auto_examples/index.html\u003e`__.\n\nTutorial\n~~~~~~~~\n\nHere is an `extensive\ntutorial \u003chttp://glm-tools.github.io/pyglmnet/tutorial.html\u003e`__ on GLMs,\noptimization and pseudo-code.\n\nHere are\n`slides \u003chttps://pavanramkumar.github.io/pydata-chicago-2016\u003e`__ from a\ntalk at `PyData Chicago\n2016 \u003chttp://pydata.org/chicago2016/schedule/presentation/15/\u003e`__,\ncorresponding `tutorial\nnotebooks \u003chttp://github.com/pavanramkumar/pydata-chicago-2016\u003e`__ and a\n`video \u003chttps://www.youtube.com/watch?v=zXec96KD1uA\u003e`__.\n\nHow to contribute?\n~~~~~~~~~~~~~~~~~~\n\nWe welcome pull requests. Please see our `developer documentation\npage \u003chttps://glm-tools.github.io/pyglmnet/contributing.html\u003e`__ for more\ndetails.\n\nCitation\n~~~~~~~~\n\nIf you use ``pyglmnet`` package in your publication, please cite us from\nour `JOSS publication \u003chttps://doi.org/10.21105/joss.01959\u003e`__ using the following BibTex\n\n.. code::\n\n   @article{Jas2020,\n   doi = {10.21105/joss.01959},\n   url = {https://doi.org/10.21105/joss.01959},\n   year = {2020},\n   publisher = {The Open Journal},\n   volume = {5},\n   number = {47},\n   pages = {1959},\n   author = {Mainak Jas and Titipat Achakulvisut and Aid Idrizović\n             and Daniel Acuna and Matthew Antalek and Vinicius Marques\n             and Tommy Odland and Ravi Garg and Mayank Agrawal\n             and Yu Umegaki and Peter Foley and Hugo Fernandes\n             and Drew Harris and Beibin Li and Olivier Pieters\n             and Scott Otterson and Giovanni De Toni and Chris Rodgers\n             and Eva Dyer and Matti Hamalainen and Konrad Kording and Pavan Ramkumar},\n   title = {{P}yglmnet: {P}ython implementation of elastic-net regularized generalized linear models},\n   journal = {Journal of Open Source Software}\n   }\n\nAcknowledgments\n~~~~~~~~~~~~~~~\n\n-  `Konrad Kording \u003chttp://kordinglab.com\u003e`__ for funding and support\n-  `Sara\n   Solla \u003chttp://www.physics.northwestern.edu/people/joint-faculty/sara-solla.html\u003e`__\n   for masterful GLM lectures\n\nLicense\n~~~~~~~\n\nMIT License Copyright (c) 2016-2019 Pavan Ramkumar\n\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat\n   :target: https://github.com/glm-tools/pyglmnet/blob/master/LICENSE\n.. |Travis| image:: https://api.travis-ci.org/glm-tools/pyglmnet.svg?branch=master\n   :target: https://travis-ci.org/glm-tools/pyglmnet\n.. |Codecov| image:: https://codecov.io/github/glm-tools/pyglmnet/coverage.svg?precision=0\n   :target: https://codecov.io/gh/glm-tools/pyglmnet\n.. |Circle| image:: https://circleci.com/gh/glm-tools/pyglmnet.svg?style=svg\n   :target: https://circleci.com/gh/glm-tools/pyglmnet\n.. |Gitter| image:: https://badges.gitter.im/glm-tools/pyglmnet.svg\n   :target: https://gitter.im/pavanramkumar/pyglmnet?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\n.. |DOI| image:: https://zenodo.org/badge/55302570.svg\n   :target: https://zenodo.org/badge/latestdoi/55302570\n.. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.01959/status.svg\n   :target: https://doi.org/10.21105/joss.01959\n.. _[Documentation (stable version)]: http://glm-tools.github.io/pyglmnet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglm-tools%2Fpyglmnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglm-tools%2Fpyglmnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglm-tools%2Fpyglmnet/lists"}