:orphan:
.. _general_examples:
Examples
--------
General-purpose and introductory examples for the `imbalanced-learn` toolbox.
.. raw:: html
.. raw:: html
Examples showing API imbalanced-learn usage
-------------------------------------------
Examples that show some details regarding the API of imbalanced-learn.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_multi_class_under_sampling_thumb.png
:alt: Multiclass classification with under-sampling
:ref:`sphx_glr_auto_examples_applications_plot_multi_class_under_sampling.py`
.. raw:: html
Multiclass classification with under-sampling
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_topic_classication_thumb.png
:alt: Example of topic classification in text documents
:ref:`sphx_glr_auto_examples_applications_plot_topic_classication.py`
.. raw:: html
Example of topic classification in text documents
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_outlier_rejections_thumb.png
:alt: Customized sampler to implement an outlier rejections estimator
:ref:`sphx_glr_auto_examples_applications_plot_outlier_rejections.py`
.. raw:: html
Customized sampler to implement an outlier rejections estimator
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_over_sampling_benchmark_lfw_thumb.png
:alt: Benchmark over-sampling methods in a face recognition task
:ref:`sphx_glr_auto_examples_applications_plot_over_sampling_benchmark_lfw.py`
.. raw:: html
Benchmark over-sampling methods in a face recognition task
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_porto_seguro_keras_under_sampling_thumb.png
:alt: Porto Seguro: balancing samples in mini-batches with Keras
:ref:`sphx_glr_auto_examples_applications_porto_seguro_keras_under_sampling.py`
.. raw:: html
Porto Seguro: balancing samples in mini-batches with Keras
.. raw:: html
.. only:: html
.. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_impact_imbalanced_classes_thumb.png
:alt: Fitting model on imbalanced datasets and how to fight bias
:ref:`sphx_glr_auto_examples_applications_plot_impact_imbalanced_classes.py`
.. raw:: html
Fitting model on imbalanced datasets and how to fight bias
.. raw:: html
Examples using combine class methods
====================================
Combine methods mixed over- and under-sampling methods. Generally SMOTE is used for over-sampling while some cleaning methods (i.e., ENN and Tomek links) are used to under-sample.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_bagging_classifier_thumb.png
:alt: Bagging classifiers using sampler
:ref:`sphx_glr_auto_examples_ensemble_plot_bagging_classifier.py`
.. raw:: html
Bagging classifiers using sampler
.. raw:: html
.. only:: html
.. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_comparison_ensemble_classifier_thumb.png
:alt: Compare ensemble classifiers using resampling
:ref:`sphx_glr_auto_examples_ensemble_plot_comparison_ensemble_classifier.py`
.. raw:: html
Compare ensemble classifiers using resampling
.. raw:: html
Evaluation examples
-------------------
Examples illustrating how classification using imbalanced dataset can be done.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/evaluation/images/thumb/sphx_glr_plot_classification_report_thumb.png
:alt: Evaluate classification by compiling a report
:ref:`sphx_glr_auto_examples_evaluation_plot_classification_report.py`
.. raw:: html
Evaluate classification by compiling a report
.. raw:: html
.. only:: html
.. image:: /auto_examples/evaluation/images/thumb/sphx_glr_plot_metrics_thumb.png
:alt: Metrics specific to imbalanced learning
:ref:`sphx_glr_auto_examples_evaluation_plot_metrics.py`
.. raw:: html
Metrics specific to imbalanced learning
.. raw:: html
Model Selection
---------------
Examples related to the selection of balancing methods.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/over-sampling/images/thumb/sphx_glr_plot_illustration_generation_sample_thumb.png
:alt: Sample generator used in SMOTE-like samplers
:ref:`sphx_glr_auto_examples_over-sampling_plot_illustration_generation_sample.py`
.. raw:: html
Sample generator used in SMOTE-like samplers
.. raw:: html
.. only:: html
.. image:: /auto_examples/over-sampling/images/thumb/sphx_glr_plot_shrinkage_effect_thumb.png
:alt: Effect of the shrinkage factor in random over-sampling
:ref:`sphx_glr_auto_examples_over-sampling_plot_shrinkage_effect.py`
.. raw:: html
Effect of the shrinkage factor in random over-sampling
.. raw:: html
.. only:: html
.. image:: /auto_examples/over-sampling/images/thumb/sphx_glr_plot_comparison_over_sampling_thumb.png
:alt: Compare over-sampling samplers
:ref:`sphx_glr_auto_examples_over-sampling_plot_comparison_over_sampling.py`
.. raw:: html
Compare over-sampling samplers
.. raw:: html
Pipeline examples
=================
Example of how to use the a pipeline to include under-sampling with `scikit-learn` estimators.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/under-sampling/images/thumb/sphx_glr_plot_illustration_tomek_links_thumb.png
:alt: Illustration of the definition of a Tomek link
:ref:`sphx_glr_auto_examples_under-sampling_plot_illustration_tomek_links.py`
.. raw:: html
Illustration of the definition of a Tomek link
.. raw:: html
.. only:: html
.. image:: /auto_examples/under-sampling/images/thumb/sphx_glr_plot_illustration_nearmiss_thumb.png
:alt: Sample selection in NearMiss
:ref:`sphx_glr_auto_examples_under-sampling_plot_illustration_nearmiss.py`
.. raw:: html
Sample selection in NearMiss
.. raw:: html
.. only:: html
.. image:: /auto_examples/under-sampling/images/thumb/sphx_glr_plot_comparison_under_sampling_thumb.png
:alt: Compare under-sampling samplers
:ref:`sphx_glr_auto_examples_under-sampling_plot_comparison_under_sampling.py`
.. raw:: html
Compare under-sampling samplers
.. raw:: html
.. toctree::
:hidden:
:includehidden:
/auto_examples/api/index.rst
/auto_examples/applications/index.rst
/auto_examples/combine/index.rst
/auto_examples/datasets/index.rst
/auto_examples/ensemble/index.rst
/auto_examples/evaluation/index.rst
/auto_examples/model_selection/index.rst
/auto_examples/over-sampling/index.rst
/auto_examples/pipeline/index.rst
/auto_examples/under-sampling/index.rst
.. only:: html
.. container:: sphx-glr-footer sphx-glr-footer-gallery
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download all examples in Python source code: auto_examples_python.zip `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery