Breast Cancer Wisconsin (Diagnostic)#
Features computed from digitized images of fine needle aspirates (FNA) of breast masses. They describe the characteristics of the cell nuclei present in each image. The task is to predict whether a mass is malignant or benign.
Overview#
Loader |
|
Task |
Classification |
Samples |
569 |
Features |
30 |
Targets |
2 classes: |
Missing values |
None |
License |
CC BY 4.0 |
Features#
30 real-valued features: the mean, the standard error and the worst value of ten measurements of the cell nuclei, such as radius, texture, perimeter and area. The patient identifier of the original file is not included.
Target#
y is 0 for malignant and 1 for benign. There are 212 malignant and 357 benign samples.
Source and citation#
Source: UCI Machine Learning Repository
Obtained from: scikit-learn (sklearn.datasets.load_breast_cancer), which redistributes a copy of the data. The scikit-learn version is recorded in the file.
Creators: William Wolberg, Olvi Mangasarian, Nick Street, W. Street
Please cite the dataset as:
Wolberg, W., Mangasarian, O., Street, N., & Street, W. (1993). Breast Cancer Wisconsin (Diagnostic) [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C5DW2B
See also:
Street, W. H. Wolberg and O. L. Mangasarian. Nuclear feature extraction for breast tumor diagnosis. IS&T/SPIE 1993 International Symposium on Electronic Imaging: Science and Technology, volume 1905, pages 861-870, San Jose, CA, 1993.
Mangasarian, W. N. Street and W. H. Wolberg. Breast cancer diagnosis and prognosis via linear programming. Operations Research, 43(4), pages 570-577, July-August 1995.
Wolberg, W. N. Street, and O. L. Mangasarian. Machine learning techniques to diagnose breast cancer from fine-needle aspirates. Cancer Letters 77 (1994) 163-171.
License#
CC BY 4.0, as stated by the source. The license was checked at the source on 2026-10-17. See License and citation.
Changes made#
Converted to the NumPy NPZ format. Values are stored as float64 and the diagnosis as int64 labels (0 = malignant, 1 = benign).
The diagnosis is a number instead of the letters used in the UCI file, and the sample identifier column is not included.
Feature and class names follow scikit-learn.
Note
This dataset is for learning about machine learning methods. It is not a medical tool and must not be used to diagnose anything.
Example#
>>> import numpy as np
>>> from pyml_datasets import load_breast_cancer
>>> data = load_breast_cancer()
>>> data.X.shape
(569, 30)
>>> data.target_names
('malignant', 'benign')
>>> np.bincount(data.y)
array([212, 357])