{"id":13418340,"url":"https://github.com/scikit-learn-contrib/imbalanced-learn","last_synced_at":"2025-05-12T16:32:51.423Z","repository":{"id":19753980,"uuid":"23011147","full_name":"scikit-learn-contrib/imbalanced-learn","owner":"scikit-learn-contrib","description":" A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning","archived":false,"fork":false,"pushed_at":"2025-04-21T17:00:20.000Z","size":22702,"stargazers_count":6979,"open_issues_count":58,"forks_count":1305,"subscribers_count":141,"default_branch":"master","last_synced_at":"2025-05-05T14:53:55.553Z","etag":null,"topics":["data-analysis","data-science","machine-learning","python","statistics"],"latest_commit_sha":null,"homepage":"https://imbalanced-learn.org","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/scikit-learn-contrib.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-16T05:08:26.000Z","updated_at":"2025-05-04T20:22:05.000Z","dependencies_parsed_at":"2023-01-13T20:33:43.125Z","dependency_job_id":"beb724d1-8486-48c3-9895-9b2095126a6d","html_url":"https://github.com/scikit-learn-contrib/imbalanced-learn","commit_stats":{"total_commits":814,"total_committers":86,"mean_commits":9.465116279069768,"dds":0.5122850122850122,"last_synced_commit":"b56b34686b0e4fffa42aec2a0bb7cc1305fdda99"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Fimbalanced-learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Fimbalanced-learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Fimbalanced-learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-learn-contrib%2Fimbalanced-learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-learn-contrib","download_url":"https://codeload.github.com/scikit-learn-contrib/imbalanced-learn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253540461,"owners_count":21924522,"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":["data-analysis","data-science","machine-learning","python","statistics"],"created_at":"2024-07-30T22:01:01.191Z","updated_at":"2025-05-12T16:32:51.403Z","avatar_url":"https://github.com/scikit-learn-contrib.png","language":"Python","readme":".. -*- mode: rst -*-\n\n.. _scikit-learn: http://scikit-learn.org/stable/\n\n.. _scikit-learn-contrib: https://github.com/scikit-learn-contrib\n\n|GitHubActions|_ |Codecov|_ |CircleCI|_ |PythonVersion|_ |Pypi|_ |Gitter|_ |Black|_\n\n.. |GitHubActions| image:: https://github.com/scikit-learn-contrib/imbalanced-learn/actions/workflows/tests.yml/badge.svg\n.. _GitHubActions: https://github.com/scikit-learn-contrib/imbalanced-learn/actions/workflows/tests.yml\n\n.. |Codecov| image:: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn/branch/master/graph/badge.svg\n.. _Codecov: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn\n\n.. |CircleCI| image:: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn.svg?style=shield\n.. _CircleCI: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn/tree/master\n\n.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n.. _PythonVersion: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n\n.. |Pypi| image:: https://badge.fury.io/py/imbalanced-learn.svg\n.. _Pypi: https://badge.fury.io/py/imbalanced-learn\n\n.. |Gitter| image:: https://badges.gitter.im/scikit-learn-contrib/imbalanced-learn.svg\n.. _Gitter: https://gitter.im/scikit-learn-contrib/imbalanced-learn?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n\n.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n.. _Black: :target: https://github.com/psf/black\n\n.. |PythonMinVersion| replace:: 3.10\n.. |NumPyMinVersion| replace:: 1.24.3\n.. |SciPyMinVersion| replace:: 1.10.1\n.. |ScikitLearnMinVersion| replace:: 1.3.2\n.. |MatplotlibMinVersion| replace:: 3.7.3\n.. |PandasMinVersion| replace:: 1.5.3\n.. |TensorflowMinVersion| replace:: 2.13.1\n.. |KerasMinVersion| replace:: 3.0.5\n.. |SeabornMinVersion| replace:: 0.12.2\n.. |PytestMinVersion| replace:: 7.2.2\n\nimbalanced-learn\n================\n\nimbalanced-learn is a python package offering a number of re-sampling techniques\ncommonly used in datasets showing strong between-class imbalance.\nIt is compatible with scikit-learn_ and is part of scikit-learn-contrib_\nprojects.\n\nDocumentation\n-------------\n\nInstallation documentation, API documentation, and examples can be found on the\ndocumentation_.\n\n.. _documentation: https://imbalanced-learn.org/stable/\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\n`imbalanced-learn` requires the following dependencies:\n\n- Python (\u003e= |PythonMinVersion|)\n- NumPy (\u003e= |NumPyMinVersion|)\n- SciPy (\u003e= |SciPyMinVersion|)\n- Scikit-learn (\u003e= |ScikitLearnMinVersion|)\n- Pytest (\u003e= |PytestMinVersion|)\n\nAdditionally, `imbalanced-learn` requires the following optional dependencies:\n\n- Pandas (\u003e= |PandasMinVersion|) for dealing with dataframes\n- Tensorflow (\u003e= |TensorflowMinVersion|) for dealing with TensorFlow models\n- Keras (\u003e= |KerasMinVersion|) for dealing with Keras models\n\nThe examples will requires the following additional dependencies:\n\n- Matplotlib (\u003e= |MatplotlibMinVersion|)\n- Seaborn (\u003e= |SeabornMinVersion|)\n\nInstallation\n~~~~~~~~~~~~\n\nFrom PyPi or conda-forge repositories\n.....................................\n\nimbalanced-learn is currently available on the PyPi's repositories and you can\ninstall it via `pip`::\n\n  pip install -U imbalanced-learn\n\nThe package is release also in Anaconda Cloud platform::\n\n  conda install -c conda-forge imbalanced-learn\n\nFrom source available on GitHub\n...............................\n\nIf you prefer, you can clone it and run the setup.py file. Use the following\ncommands to get a copy from Github and install all dependencies::\n\n  git clone https://github.com/scikit-learn-contrib/imbalanced-learn.git\n  cd imbalanced-learn\n  pip install .\n\nBe aware that you can install in developer mode with::\n\n  pip install --no-build-isolation --editable .\n\nIf you wish to make pull-requests on GitHub, we advise you to install\npre-commit::\n\n  pip install pre-commit\n  pre-commit install\n\nTesting\n~~~~~~~\n\nAfter installation, you can use `pytest` to run the test suite::\n\n  make coverage\n\nDevelopment\n-----------\n\nThe development of this scikit-learn-contrib is in line with the one\nof the scikit-learn community. Therefore, you can refer to their\n`Development Guide\n\u003chttp://scikit-learn.org/stable/developers\u003e`_.\n\nEndorsement of the Scientific Python Specification\n--------------------------------------------------\n\nWe endorse good practices from the Scientific Python Ecosystem Coordination (SPEC).\nThe full list of recommendations is available `here`_.\n\nSee below the list of recommendations that we endorse for the imbalanced-learn project.\n\n|SPEC 0 — Minimum Supported Dependencies|\n\n.. |SPEC 0 — Minimum Supported Dependencies| image:: https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811\u0026color=%235CA038\n   :target: https://scientific-python.org/specs/spec-0000/\n\n.. _here: https://scientific-python.org/specs/\n\nAbout\n-----\n\nIf you use imbalanced-learn in a scientific publication, we would appreciate\ncitations to the following paper::\n\n  @article{JMLR:v18:16-365,\n  author  = {Guillaume  Lema{{\\^i}}tre and Fernando Nogueira and Christos K. Aridas},\n  title   = {Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning},\n  journal = {Journal of Machine Learning Research},\n  year    = {2017},\n  volume  = {18},\n  number  = {17},\n  pages   = {1-5},\n  url     = {http://jmlr.org/papers/v18/16-365}\n  }\n\nMost classification algorithms will only perform optimally when the number of\nsamples of each class is roughly the same. Highly skewed datasets, where the\nminority is heavily outnumbered by one or more classes, have proven to be a\nchallenge while at the same time becoming more and more common.\n\nOne way of addressing this issue is by re-sampling the dataset as to offset this\nimbalance with the hope of arriving at a more robust and fair decision boundary\nthan you would otherwise.\n\nYou can refer to the `imbalanced-learn`_ documentation to find details about\nthe implemented algorithms.\n\n.. _imbalanced-learn: https://imbalanced-learn.org/stable/user_guide.html\n","funding_links":[],"categories":["Multipurpose","Python","Machine Learning","Uncategorized","特征工程","Statistics / Machine Learning building blocks","\u003cspan id=\"head50\"\u003e3.6. Probablistic Machine Learning and Deep Learning\u003c/span\u003e","Machine Learning Framework","Table of Contents","Sklearn实用程序","Other useful related lists and resources","🐍 Python","Machine Learning Frameworks"],"sub_categories":["Imbalanced Datasets","Uncategorized","Semi-supervised Learning","General Purpose Framework","Useful Python Tools for Data Analysis"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Fimbalanced-learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-learn-contrib%2Fimbalanced-learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-learn-contrib%2Fimbalanced-learn/lists"}