fetch_olivetti_faces
- sklearn.datasets.fetch_olivetti_faces(*, data_home=None, shuffle=False, random_state=0, download_if_missing=True, return_X_y=False, n_retries=3,
Load the Olivetti faces data-set from AT&T (classification).
Download it if necessary.
Classes | 40 |
Samples total | 400 |
Dimensionality | 4096 |
Features | real, between 0 and 1 |
Read more in the User Guide.
Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.
If True the order of the dataset is shuffled to avoid having images of the same person grouped.
Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls. See Glossary.
If False, raise an OSError if the data is not locally available instead of trying to download the data from the source site.
If True, returns instead of a object. See
below for more information about the and objects.
BunchDictionary-like object, with the following attributes.
Each row corresponds to a ravelled face image of original size 64 x 64 pixels.
Each row is a face image corresponding to one of the 40 subjects of the dataset.
Labels associated to each face image. Those labels are ranging from 0-39 and correspond to the Subject IDs.
Description of the modified Olivetti Faces Dataset.
>>> from sklearn.datasets import fetch_olivetti_faces
>>> olivetti_faces = fetch_olivetti_faces()
>>> olivetti_faces.data.shape
(400, 4096)
>>> olivetti_faces.target.shape
(400,)
>>> olivetti_faces.images.shape
(400, 64, 64)
BunchdatatargetNumber of retries when HTTP errors are encountered.
Number of seconds between retries.
Tuple with the data and target objects described above.