Echo Dot (3rd Gen) - Smart speaker with Alexa - Charcoal

Use your voice to play a song, artist, or genre through Amazon Music, Apple Music, Spotify, Pandora, and others. With compatible Echo devices in different rooms, you can fill your whole home with music.

Buy Now

Wireless Rechargeable Battery Powered WiFi Camera.

Wireless Rechargeable Battery Powered WiFi Camera is home security camera system lets you listen in and talk back through the built in speaker and microphone that work directly through your iPhone or Android Mic.

Buy Now

Standard Machine Learning Datasets for Imbalanced Classification

0
123


An imbalanced classification problem is a problem that involves predicting a class label where the distribution of class labels in the training dataset is skewed.

Many real-world classification problems have an imbalanced class distribution, therefore it is important for machine learning practitioners to get familiar with working with these types of problems.

In this tutorial, you will discover a suite of standard machine learning datasets for imbalanced classification.

After completing this tutorial, you will know:

  • Standard machine learning datasets with an imbalance of two classes.
  • Standard datasets for multiclass classification with a skewed class distribution.
  • Popular imbalanced classification datasets used for machine learning competitions.

Let’s get started.

Standard Machine Learning Datasets for Imbalanced Classification

Standard Machine Learning Datasets for Imbalanced Classification
Photo by Graeme Churchard, some rights reserved.

Tutorial Overview

This tutorial is divided into three parts; they are:

  1. Binary Classification Datasets
  2. Multiclass Classification Datasets
  3. Competition and Other Datasets

Binary Classification Datasets

Binary classification predictive modeling problems are those with two classes.

Typically, imbalanced binary classification problems describe a normal state (class 0) and an abnormal state (class 1), such as fraud, a diagnosis, or a fault.

In this section, we will take a closer look at three standard binary classification machine learning datasets with a class imbalance. These are datasets that are small enough to fit in memory and have been well studied, providing the basis of investigation in many research papers.

The names of these datasets are as follows:

  • Pima Indians Diabetes (Pima)
  • Haberman Breast Cancer (Haberman)
  • German Credit (German)

Each dataset will be loaded and the nature of the class imbalance will be summarized.

Pima Indians Diabetes (Pima)

Each record describes the medical details of a female, and the prediction is the onset of diabetes within the next five years.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Haberman Breast Cancer (Haberman)

Each record describes the medical details of a patient and the prediction is whether the patient survived after five years or not.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



German Credit (German)

Each record describes the financial details of a person and the prediction is whether the person is a good credit risk.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Multiclass Classification Datasets

Multiclass classification predictive modeling problems are those with more than two classes.

Typically, imbalanced multiclass classification problems describe multiple different events, some significantly more common than others.

In this section, we will take a closer look at three standard multiclass classification machine learning datasets with a class imbalance. These are datasets that are small enough to fit in memory and have been well studied, providing the basis of investigation in many research papers.

The names of these datasets are as follows:

  • Glass Identification (Glass)
  • E-coli (Ecoli)
  • Thyroid Gland (Thyroid)

Note: it is common in research papers to transform imbalanced multiclass classification problems into imbalanced binary classification problems by grouping all of the majority classes into one class and leaving the smallest minority class.

Each dataset will be loaded and the nature of the class imbalance will be summarized.

Glass Identification (Glass)

Each record describes the chemical content of glass and prediction involves the type of glass.

Below provides a sample of the first five rows of the dataset.



The first column represents a row identifier and can be removed.

The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



E-coli (Ecoli)

Each record describes the result of different tests and prediction involves the protein localization site name.

Below provides a sample of the first five rows of the dataset.



The first column represents a row identifier or name and can be removed.

The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Thyroid Gland (Thyroid)

Each record describes the result of different tests on a thyroid and prediction involves the medical diagnosis of the thyroid.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Competition and Other Datasets

This section lists additional datasets used in research papers that are less used, larger, or datasets used as the basis of machine learning competitions.

The names of these datasets are as follows:

  • Credit Card Fraud (Credit)
  • Porto Seguro Auto Insurance Claim (Porto Seguro)

Each dataset will be loaded and the nature of the class imbalance will be summarized.

Credit Card Fraud (Credit)

Each record describes a credit card translation and it is classified as fraud.

This data is about 144 megabytes uncompressed or 66 megabytes compressed.

Download the dataset and unzip it into your current working directory.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Porto Seguro Auto Insurance Claim (Porto Seguro)

Each record describes people’s car insurance details and prediction involves whether or not the person will make an insurance claim.

This data is about 42 megabytes compressed.

Download the dataset and unzip it into your current working directory.

Below provides a sample of the first five rows of the dataset.



The example below loads and summarizes the class breakdown of the dataset.



Running the example provides the following output.



Further Reading

This section provides more resources on the topic if you are looking to go deeper.

Papers

Articles

Summary

In this tutorial, you discovered a suite of standard machine learning datasets for imbalanced classification.

Specifically, you learned:

  • Standard machine learning datasets with an imbalance of two classes.
  • Standard datasets for multiclass classification with a skewed class distribution.
  • Popular imbalanced classification datasets used for machine learning competitions.

Do you have any questions?
Ask your questions in the comments below and I will do my best to answer.



Read More

LEAVE A REPLY

Please enter your comment!
Please enter your name here