{"id":25726567,"url":"https://github.com/civisanalytics/python-glmnet","last_synced_at":"2025-04-13T00:48:52.203Z","repository":{"id":9872721,"uuid":"60364135","full_name":"civisanalytics/python-glmnet","owner":"civisanalytics","description":"A python port of the glmnet package for fitting generalized linear models via penalized maximum likelihood.","archived":true,"fork":false,"pushed_at":"2024-07-24T15:39:38.000Z","size":193,"stargazers_count":265,"open_issues_count":17,"forks_count":58,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-13T00:48:47.260Z","etag":null,"topics":["elasticnet","glm","glmnet","lasso","python","r"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/civisanalytics.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2016-06-03T17:03:07.000Z","updated_at":"2025-03-14T21:32:34.000Z","dependencies_parsed_at":"2022-07-08T10:23:23.616Z","dependency_job_id":"d829069e-0b0b-4ff0-98ae-d94196ce520f","html_url":"https://github.com/civisanalytics/python-glmnet","commit_stats":{"total_commits":47,"total_committers":10,"mean_commits":4.7,"dds":0.7446808510638299,"last_synced_commit":"813c06f5fcc9604d8e445bd4992f53c4855cc7cb"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fpython-glmnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fpython-glmnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fpython-glmnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fpython-glmnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/civisanalytics","download_url":"https://codeload.github.com/civisanalytics/python-glmnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650436,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["elasticnet","glm","glmnet","lasso","python","r"],"created_at":"2025-02-25T23:17:40.804Z","updated_at":"2025-04-13T00:48:52.176Z","avatar_url":"https://github.com/civisanalytics.png","language":"Python","readme":"Python GLMNET\n=============\n\nMaintenance Warning\n-------------------\n\nThis package is not longer maintained.\n\nDescription\n-----------\n\nThis is a Python wrapper for the fortran library used in the R package\n`glmnet \u003chttp://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html\u003e`__.\nWhile the library includes linear, logistic, Cox, Poisson, and\nmultiple-response Gaussian, only linear and logistic are implemented in\nthis package.\n\nThe API follows the conventions of\n`Scikit-Learn \u003chttp://scikit-learn.org/stable/\u003e`__, so it is expected to\nwork with tools from that ecosystem.\n\nInstallation\n------------\n\nrequirements\n~~~~~~~~~~~~\n\n``python-glmnet`` requires Python version \u003e= 3.6, ``scikit-learn``, ``numpy``,\nand ``scipy``. Installation from source or via ``pip`` requires a Fortran compiler.\n\nconda\n~~~~~\n\n.. code:: bash\n\n    conda install -c conda-forge glmnet\n\n\npip\n~~~\n\n.. code:: bash\n\n    pip install glmnet\n\n\nsource\n~~~~~~\n\n``glmnet`` depends on numpy, scikit-learn and scipy.\nA working Fortran compiler is also required to build the package.\nFor Mac users, ``brew install gcc`` will take care of this requirement.\n\n.. code:: bash\n\n    git clone git@github.com:civisanalytics/python-glmnet.git\n    cd python-glmnet\n    python setup.py install\n\nUsage\n-----\n\nGeneral\n~~~~~~~\n\nBy default, ``LogitNet`` and ``ElasticNet`` fit a series of models using\nthe lasso penalty (α = 1) and up to 100 values for λ (determined by the\nalgorithm). In addition, after computing the path of λ values,\nperformance metrics for each value of λ are computed using 3-fold cross\nvalidation. The value of λ corresponding to the best performing model is\nsaved as the ``lambda_max_`` attribute and the largest value of λ such\nthat the model performance is within ``cut_point * standard_error`` of\nthe best scoring model is saved as the ``lambda_best_`` attribute.\n\nThe ``predict`` and ``predict_proba`` methods accept an optional\nparameter ``lamb`` which is used to select which model(s) will be used\nto make predictions. If ``lamb`` is omitted, ``lambda_best_`` is used.\n\nBoth models will accept dense or sparse arrays.\n\nRegularized Logistic Regression\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from glmnet import LogitNet\n\n    m = LogitNet()\n    m = m.fit(x, y)\n\nPrediction is similar to Scikit-Learn:\n\n.. code:: python\n\n    # predict labels\n    p = m.predict(x)\n    # or probability estimates\n    p = m.predict_proba(x)\n\nRegularized Linear Regression\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from glmnet import ElasticNet\n\n    m = ElasticNet()\n    m = m.fit(x, y)\n\nPredict:\n\n.. code:: python\n\n    p = m.predict(x)\n","funding_links":[],"categories":["Machine Learning Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivisanalytics%2Fpython-glmnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcivisanalytics%2Fpython-glmnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivisanalytics%2Fpython-glmnet/lists"}