API Reference / datasets / builtin /

classification.py

Convenience loaders for the bundled classification datasets.

Each function reads one ARFF file that ships with TuiML and returns a Dataset. They take no arguments and need no download, so they are the quickest way to get a labelled dataset for an example, a test, or a benchmark.

Every loader here is also reachable by name through load_dataset, and its shape and class count are recorded in DATASET_REGISTRY.

python
>>> from tuiml.datasets import load_iris
>>> X, y = load_iris()
>>> X.shape
(150, 4)

Functions

Func

load_iris

Line 25
load_iris() -> Dataset

Load the classic Iris flower dataset.

150 samples, 4 features, and 3 classes (setosa, versicolor, virginica).

Returns

Dataset
Standardized dataset object containing the data and metadata.
python
>>> from tuiml.datasets import load_iris
>>> X, y = load_iris()
Func

load_diabetes

Line 44
load_diabetes() -> Dataset

Load the Pima Indians Diabetes dataset.

768 samples, 8 features, 2 classes.

Returns

dataset
Dataset
Diabetes classification dataset.
Func

load_breast_cancer

Line 57
load_breast_cancer() -> Dataset

Load the Breast Cancer Wisconsin dataset.

286 samples, 9 features, 2 classes (recurrence, no-recurrence).

Returns

dataset
Dataset
Breast cancer recurrence classification dataset.
Func

load_glass

Line 70
load_glass() -> Dataset

Load the Glass Identification dataset.

214 samples, 9 features, 7 classes.

Returns

dataset
Dataset
Glass type classification dataset.
Func

load_ionosphere

Line 83
load_ionosphere() -> Dataset

Load the Ionosphere dataset.

351 samples, 34 features, 2 classes.

Returns

dataset
Dataset
Radar signal classification dataset.
Func

load_vote

Line 96
load_vote() -> Dataset

Load the Congressional Voting Records dataset.

435 samples, 16 features, 2 classes.

Returns

dataset
Dataset
Congressional voting classification dataset.
Func

load_credit

Line 109
load_credit() -> Dataset

Load the German Credit dataset.

1000 samples, 20 features, 2 classes.

Returns

dataset
Dataset
German credit risk classification dataset.
Func

load_soybean

Line 124
load_soybean() -> Dataset

Load the Soybean dataset.

683 samples, 35 features, 19 classes.

Returns

dataset
Dataset
Soybean disease classification dataset.
Func

load_labor

Line 137
load_labor() -> Dataset

Load the Labor Relations dataset.

57 samples, 16 features, 2 classes.

Returns

dataset
Dataset
Labor negotiations outcome classification dataset.
Func

load_contact_lenses

Line 150
load_contact_lenses() -> Dataset

Load the Contact Lenses dataset.

24 samples, 4 features, 3 classes.

Returns

dataset
Dataset
Contact lens prescription classification dataset.
Func

load_hypothyroid

Line 163
load_hypothyroid() -> Dataset

Load the Hypothyroid dataset.

3772 samples, 29 features, 4 classes.

Returns

dataset
Dataset
Hypothyroid disease classification dataset.