{"id":13399106,"url":"https://github.com/scikit-learn-contrib/lightning","last_synced_at":"2025-09-28T21:30:28.207Z","repository":{"id":1024624,"uuid":"3153959","full_name":"scikit-learn-contrib/lightning","owner":"scikit-learn-contrib","description":"Large-scale linear classification, regression and ranking in Python","archived":true,"fork":false,"pushed_at":"2023-07-18T11:41:11.000Z","size":14720,"stargazers_count":1708,"open_issues_count":56,"forks_count":212,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-04-24T16:46:43.526Z","etag":null,"topics":["machine-learning"],"latest_commit_sha":null,"homepage":"https://contrib.scikit-learn.org/lightning/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scikit-learn-contrib.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2012-01-11T13:53:52.000Z","updated_at":"2024-06-18T15:25:07.429Z","dependencies_parsed_at":"2024-06-18T15:25:03.146Z","dependency_job_id":"6e74409e-0c77-4b51-a9ac-b622a928ee77","html_url":"https://github.com/scikit-learn-contrib/lightning","commit_stats":{"total_commits":691,"total_committers":19,"mean_commits":36.36842105263158,"dds":0.2547033285094067,"last_synced_commit":"dbbe833963280e675c124bbd5caadfcb13d89bd7"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Flightning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Flightning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Flightning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Flightning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-learn-contrib","download_url":"https://codeload.github.com/scikit-learn-contrib/lightning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234563125,"owners_count":18853056,"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":["machine-learning"],"created_at":"2024-07-30T19:00:34.202Z","updated_at":"2025-09-28T21:30:22.806Z","avatar_url":"https://github.com/scikit-learn-contrib.png","language":"Python","readme":".. -*- mode: rst -*-\n\n.. image:: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml/badge.svg?branch=master\n    :target: https://github.com/scikit-learn-contrib/lightning/actions/workflows/main.yml\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.200504.svg\n    :target: https://doi.org/10.5281/zenodo.200504\n\nlightning\n==========\n\nlightning is a library for large-scale linear classification, regression and\nranking in Python.\n\nHighlights:\n\n- follows the `scikit-learn \u003chttps://scikit-learn.org\u003e`_ API conventions\n- supports natively both dense and sparse data representations\n- computationally demanding parts implemented in `Cython \u003chttps://cython.org\u003e`_\n\nSolvers supported:\n\n- primal coordinate descent\n- dual coordinate descent (SDCA, Prox-SDCA)\n- SGD, AdaGrad, SAG, SAGA, SVRG\n- FISTA\n\nExample\n-------\n\nExample that shows how to learn a multiclass classifier with group lasso\npenalty on the News20 dataset (c.f., `Blondel et al. 2013\n\u003chttp://www.mblondel.org/publications/mblondel-mlj2013.pdf\u003e`_):\n\n.. code-block:: python\n\n    from sklearn.datasets import fetch_20newsgroups_vectorized\n    from lightning.classification import CDClassifier\n\n    # Load News20 dataset from scikit-learn.\n    bunch = fetch_20newsgroups_vectorized(subset=\"all\")\n    X = bunch.data\n    y = bunch.target\n\n    # Set classifier options.\n    clf = CDClassifier(penalty=\"l1/l2\",\n                       loss=\"squared_hinge\",\n                       multiclass=True,\n                       max_iter=20,\n                       alpha=1e-4,\n                       C=1.0 / X.shape[0],\n                       tol=1e-3)\n\n    # Train the model.\n    clf.fit(X, y)\n\n    # Accuracy\n    print(clf.score(X, y))\n\n    # Percentage of selected features\n    print(clf.n_nonzero(percentage=True))\n\nDependencies\n------------\n\nlightning requires Python \u003e= 3.7, setuptools, Joblib, Numpy \u003e= 1.12, SciPy \u003e= 0.19 and\nscikit-learn \u003e= 0.19. Building from source also requires Cython and a working C/C++ compiler. To run the tests you will also need pytest.\n\nInstallation\n------------\n\nPrecompiled binaries for the stable version of lightning are available for the main platforms and can be installed using pip:\n\n.. code-block:: sh\n\n    pip install sklearn-contrib-lightning\n\nor conda:\n\n.. code-block:: sh\n\n    conda install -c conda-forge sklearn-contrib-lightning\n\nThe development version of lightning can be installed from its git repository. In this case it is assumed that you have the git version control system, a working C++ compiler, Cython and the numpy development libraries. In order to install the development version, type:\n\n.. code-block:: sh\n\n  git clone https://github.com/scikit-learn-contrib/lightning.git\n  cd lightning\n  python setup.py install\n\nDocumentation\n-------------\n\nhttp://contrib.scikit-learn.org/lightning/\n\nOn GitHub\n---------\n\nhttps://github.com/scikit-learn-contrib/lightning\n\nCiting\n------\n\nIf you use this software, please cite it. Here is a BibTex snippet that you can use:\n\n.. code-block::\n\n  @misc{lightning_2016,\n    author       = {Blondel, Mathieu and\n                    Pedregosa, Fabian},\n    title        = {{Lightning: large-scale linear classification,\n                   regression and ranking in Python}},\n    year         = 2016,\n    doi          = {10.5281/zenodo.200504},\n    url          = {https://doi.org/10.5281/zenodo.200504}\n  }\n\nOther citing formats are available in `its Zenodo entry \u003chttps://doi.org/10.5281/zenodo.200504\u003e`_.\n\nAuthors\n-------\n\n- Mathieu Blondel\n- Manoj Kumar\n- Arnaud Rachez\n- Fabian Pedregosa\n- Nikita Titov\n","funding_links":[],"categories":["Machine Learning Framework","Sklearn实用程序","Python","Machine Learning Frameworks"],"sub_categories":["General Purpose Framework"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Flightning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-learn-contrib%2Flightning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Flightning/lists"}