Skip to main content

CircleCI GitHub Codecov ReadTheDocs PythonVersion pylint PyPi

common-datasets: common machine learning datasets

This package provides an unofficial collection of datasets widely used in the evaluation of machine learning techniques, mainly small and imbalanced datasets for binary, multiclass classification and regression. The datasets are provided in the usual sklearn.datasets format, with missing data imputation and the encoding of category and ordinal features. The authors of this repository do not own any licenses for the datasets, the goal of the project is to provide a stanardized collection of datasets for research purposes.

PLEASE DO NOT CITE OR REFER TO THIS PACKAGE IN ANY FORM!

If you use data through this repository, please cite the original works publishing and specifying these datasets:

@article{keel,
  author={Alcala-Fdez, J. and Fernandez, A. and Luengo, J. and Derrac, J. and Garcia, S.
          and Sanchez, L. and Herrera, F.},
  title={KEEL Data-Mining Software Tool: Data Set Repository, Integration of Algorithms
          and Experimental Analysis Framework},
  journal={Journal of Multiple-Valued Logic and Soft Computing},
  volume={17},
  number={2-3},
  year={2011},
  pages={255-287}}

@misc{uci,
  author = "Dua, Dheeru and Karra Taniskidou, Efi",
  year = "2017",
  title = "{UCI} Machine Learning Repository",
  url = "http://archive.ics.uci.edu/ml",
  institution = "University of California, Irvine, School of Information and Computer Sciences"}

@article{krnn,
  author={X. J. Zhang and Z. Tari and M. Cheriet},
  title={{KRNN}: k {Rare-class Nearest Neighbor} classification},
  journal={Pattern Recognition},
  year={2017},
  volume={62},
  number={2},
  pages={33--44}
  }

For each individual dataset the citation key referring to its publisher or a relevant publication in which the dataset in the given configuration has been used is provided as part of the dataset. For example:

# binary classification
>> import common_datasets.binary_classification as binclas

>> dataset = bin_clas.load_abalone19()
>> dataset['citation_key']
'keel'

Introduction

The package contains 119 binary classification, 23 multiclass classification and 23 regression datasets.

Installation

The package can be cloned from GitHub in the usual way, and the latest stable version is also available in the PyPI repository:

pip install common_datasets

Use cases

Loading a dataset

# binary classification
import common_datasets.binary_classification as binclas

dataset = binclas.load_abalone19()

# multiclass classification
import common_datasets.multiclass_classification as multclas

dataset = multclas.load_abalone()

# regression
from common_datasets import regression

dataset = regression.load_treasury()

Querying all dataset loaders and loading a dataset

# binary classification
import common_datasets.binary_classification as binclas

data_loaders = binclas.get_data_loaders()

dataset_0 = data_loaders[0]()

# multiclass classification
import common_datasets.multiclass_classification as multclas

data_loaders = multclas.get_data_loaders()

dataset_0 = data_loaders[0]()

# regression
from common_datasets import regression

data_loaders = regression.get_data_loaders()

dataset_0 = data_loaders[0]()

Querying the loaders of the 5 smallest datasets regarding the total number of records

# binary classification
import common_datasets.binary_classification as binclas

data_loaders = binclas.get_filtered_data_loaders(n_smallest=5, sorting='n')

dataset_0 = data_loaders[0]()

# multiclass classification
import common_datasets.multiclass_classification as multclas

data_loaders = multclas.get_data_loaders(n_smallest=5, sorting='n')

dataset_0 = data_loaders[0]()

# regression
from common_datasets import regression

data_loaders = regression.get_data_loaders(n_smallest=5, sorting='n')

dataset_0 = data_loaders[0]()

Documentation

Metadata

Release files for common-datasets 0.3.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for common-datasets 0.3.10
File Size Uploaded
common_datasets-0.3.10.tar.gz 14.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for common-datasets 0.3.10
File Interpreter ABI Platform
common_datasets-0.3.10-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 MB

Release files / common_datasets-0.3.10.tar.gz

Download URL common_datasets-0.3.10.tar.gz
Size 14.6 MB
Tags Source
SHA-256 checksum
How to use checksums
1bad732c1aee0f3d479a111b14c1e3142742ad4748694b4b20b33cc7217ed6c7
BLAKE2b-256 checksum
How to use checksums
bb8121e1f8ae8ea00639be5a259e25760ea6526a1476608042ed3c2deb1618c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / common_datasets-0.3.10-py3-none-any.whl

Download URL common_datasets-0.3.10-py3-none-any.whl
Size 15.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6e2a68ee16b29ea071c3c7a14c1ae36509c14adcdac342ea6af82859c82d6bc4
BLAKE2b-256 checksum
How to use checksums
02c869cd78a739a25c4b33a7ded6150540c37dd9639bc1f5609f00388dd3b2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.3.10 This release

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page