Load the Labeled Faces in the Wild (LFW) people dataset (classification).
Download it if necessary.
For a usage example of this dataset, see Faces recognition example using eigenfaces and SVMs.
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.
Download and use the funneled variant of the dataset.
Ratio used to resize the each face picture. If None
, no resizing is performed.
The extracted dataset will only retain pictures of people that have at least min_faces_per_person
different pictures.
Keep the 3 RGB channels instead of averaging them to a single gray level channel. If color is True the shape of the data has one more dimension than the shape with color = False.
Provide a custom 2D slice (height, width) to extract the ‘interesting’ part of the jpeg files and avoid use statistical correlation from the background.
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 (dataset.data, dataset.target)
instead of a Bunch object. See below for more information about the dataset.data
and dataset.target
object.
Added in version 0.20.
Number of retries when HTTP errors are encountered.
Added in version 1.5.
Number of seconds between retries.
Added in version 1.5.
Bunch
Dictionary-like object, with the following attributes.
Each row corresponds to a ravelled face image of original size 62 x 47 pixels. Changing the slice_
or resize parameters will change the shape of the output.
Each row is a face image corresponding to one of the 5749 people in the dataset. Changing the slice_
or resize parameters will change the shape of the output.
Labels associated to each face image. Those labels range from 0-5748 and correspond to the person IDs.
Names of all persons in the dataset. Position in array corresponds to the person ID in the target array.
Description of the Labeled Faces in the Wild (LFW) dataset.
return_X_y
is True
A tuple of two ndarray. The first containing a 2D array of shape (n_samples, n_features) with each row representing one sample and each column representing the features. The second ndarray of shape (n_samples,) containing the target samples.
Added in version 0.20.
Examples
>>> from sklearn.datasets import fetch_lfw_people >>> lfw_people = fetch_lfw_people() >>> lfw_people.data.shape (13233, 2914) >>> lfw_people.target.shape (13233,) >>> for name in lfw_people.target_names[:5]: ... print(name) AJ Cook AJ Lamas Aaron Eckhart Aaron Guiel Aaron Patterson
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4