§
    ¨éUgX  ã                   ó¨  — d Z ddlZddlmZmZ ddlmZmZmZm	Z	 ddl
mZmZmZ ddlZddlmZ ddlmZ dd	lmZmZmZmZ dd
lmZ ddlmZmZmZmZ  ej         e!¦  «        Z" eddd¬¦  «        Z# eddd¬¦  «        Z$ eddd¬¦  «         eddd¬¦  «         eddd¬¦  «        fZ%	 d6d „Z&d!„ Z'	 d7d#„Z( ee)edgd$g eeddd%¬&¦  «        dg eeddd'¬&¦  «        dgd$ge* ed¦  «        gd$gd$g eeddd'¬&¦  «        g eed(dd%¬&¦  «        gd)œ
d¬*¦  «        ddd+dd" e+d,d-¦  «         e+d.d/¦  «        fdd"ddd)œ
d0„¦   «         Z,	 d8d1„Z- e eh d2£¦  «        ge)edgd$g eeddd%¬&¦  «        dgd$ge* ed¦  «        gd$g eeddd'¬&¦  «        g eed(dd%¬&¦  «        gd3œ	d¬*¦  «        d4ddd+d" e+d,d-¦  «         e+d.d/¦  «        fdddd3œ	d5„¦   «         Z.dS )9zÞLabeled Faces in the Wild (LFW) dataset

This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:

    http://vis-www.cs.umass.edu/lfw/
é    N)ÚIntegralÚReal)ÚPathLikeÚlistdirÚmakedirsÚremove)ÚexistsÚisdirÚjoin)ÚMemoryé   )ÚBunch)ÚHiddenÚIntervalÚ
StrOptionsÚvalidate_params)Útarfile_extractallé   )ÚRemoteFileMetadataÚ_fetch_remoteÚget_data_homeÚ
load_descrzlfw.tgzz.https://ndownloader.figshare.com/files/5976018Ú@055f7d9c632d7370e6fb4afc7468d40f970c34a80d4c6f50ffec63f5a8d536c0)ÚfilenameÚurlÚchecksumzlfw-funneled.tgzz.https://ndownloader.figshare.com/files/5976015Ú@b47c8422c8cded889dc5a13418c4bc2abbda121092b3533a83306f90d900100aúpairsDevTrain.txtz.https://ndownloader.figshare.com/files/5976012Ú@1d454dada7dfeca0e7eab6f65dc4e97a6312d44cf142207be28d688be92aabfaúpairsDevTest.txtz.https://ndownloader.figshare.com/files/5976009Ú@7cb06600ea8b2814ac26e946201cdb304296262aad67d046a16a7ec85d0ff87cú	pairs.txtz.https://ndownloader.figshare.com/files/5976006Ú@ea42330c62c92989f9d7c03237ed5d591365e89b3e649747777b70e692dc1592Té   ç      ð?c                 ó¤  — t          | ¬¦  «        } t          | d¦  «        }t          |¦  «        st          |¦  «         t          D ]n}t          ||j        ¦  «        }t          |¦  «        sH|r4t                               d|j        ¦  «         t          ||||¬¦  «         Œ\t          d|z  ¦  «        ‚Œo|rt          |d¦  «        }t          }	nt          |d¦  «        }t          }	t          |¦  «        sÙt          ||	j        ¦  «        }
t          |
¦  «        sH|r4t                               d|	j        ¦  «         t          |	|||¬¦  «         nt          d|
z  ¦  «        ‚d	d
l}t                               d|¦  «         |                     |
d¦  «        5 }t!          ||¬¦  «         d
d
d
¦  «         n# 1 swxY w Y   t#          |
¦  «         ||fS )z0Helper function to download any missing LFW data)Ú	data_homeÚlfw_homezDownloading LFW metadata: %s)ÚdirnameÚ	n_retriesÚdelayz%s is missingÚlfw_funneledÚlfwz!Downloading LFW data (~200MB): %sr   Nz$Decompressing the data archive to %szr:gz)Úpath)r   r   r	   r   ÚTARGETSr   ÚloggerÚinfor   r   ÚOSErrorÚFUNNELED_ARCHIVEÚARCHIVEÚtarfileÚdebugÚopenr   r   )r'   ÚfunneledÚdownload_if_missingr*   r+   r(   ÚtargetÚtarget_filepathÚdata_folder_pathÚarchiveÚarchive_pathr5   Úfps                úT/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/sklearn/datasets/_lfw.pyÚ_check_fetch_lfwrA   M   sH  € õ
 ¨	Ð2Ñ2Ô2€IÝ�I˜zÑ*Ô*€Hå�(ÑÔð Ý�ÑÔÐåð 	Að 	AˆÝ˜x¨¬Ñ9Ô9ˆÝ�oÑ&Ô&ð 	AØ"ð AÝ—’Ð:¸F¼JÑGÔGÐGÝØ H¸	Èðñ ô ð ð õ ˜o°Ñ?Ñ@Ô@Ð@ð	Að ð Ý ¨.Ñ9Ô9ÐÝ"ˆˆå ¨%Ñ0Ô0ÐÝˆåÐ"Ñ#Ô#ð Ý˜H gÔ&6Ñ7Ô7ˆÝ�lÑ#Ô#ð 	>Ø"ð >Ý—’Ð?ÀÄÑMÔMÐMÝØ X¸È%ðñ ô ð ð õ ˜o°Ñ<Ñ=Ô=Ð=àˆˆˆå�ŠÐ;Ð=MÑNÔNÐNØ�\Š\˜,¨Ñ/Ô/ð 	2°2Ý˜r¨Ð1Ñ1Ô1Ð1ð	2ð 	2ð 	2ñ 	2ô 	2ð 	2ð 	2ð 	2ð 	2ð 	2ð 	2øøøð 	2ð 	2ð 	2ð 	2åˆ|ÑÔÐàÐ%Ð%Ð%s   ÆF4Æ4F8Æ;F8c                 ód  — 	 ddl m} n# t          $ r t          d¦  «        ‚w xY wt          dd¦  «        t          dd¦  «        f}|€|}n't	          d„ t          ||¦  «        D ¦   «         ¦  «        }|\  }}|j        |j        z
  |j        pdz  }|j        |j        z
  |j        pdz  }	|�3t          |¦  «        }t          ||z  ¦  «        }t          ||	z  ¦  «        }	t          | ¦  «        }
|s$t          j        |
||	ft          j        ¬¦  «        }n$t          j        |
||	d	ft          j        ¬¦  «        }t          | ¦  «        D ]é\  }}|d
z  dk    rt                                d|dz   |
¦  «         |                     |¦  «        }|                     |j        |j        |j        |j        f¦  «        }|�|                     |	|f¦  «        }t          j        |t          j        ¬¦  «        }|j        dk    rt/          d|z  ¦  «        ‚|dz  }|s|                     d¬¦  «        }|||df<   Œê|S )zInternally used to load imagesr   )ÚImagez¨The Python Imaging Library (PIL) is required to load data from jpeg files. Please refer to https://pillow.readthedocs.io/en/stable/installation.html for installing PIL.éú   Nc              3   ó$   K  — | ]\  }}|p|V — Œd S )N© )Ú.0ÚsÚdss      r@   ú	<genexpr>z_load_imgs.<locals>.<genexpr>‘   s*   è è € ÐGÐG¡5 1 b�q�w˜BÐGÐGÐGÐGÐGÐGó    r   ©Údtyper$   iè  zLoading face #%05d / %05dzLFailed to read the image file %s, Please make sure that libjpeg is installedg     ào@r   )Úaxis.)ÚPILrC   ÚImportErrorÚsliceÚtupleÚzipÚstopÚstartÚstepÚfloatÚintÚlenÚnpÚzerosÚfloat32Ú	enumerater0   r6   r7   ÚcropÚresizeÚasarrayÚndimÚRuntimeErrorÚmean)Ú
file_pathsÚslice_Úcolorr_   rC   Údefault_sliceÚh_sliceÚw_sliceÚhÚwÚn_facesÚfacesÚiÚ	file_pathÚpil_imgÚfaces                   r@   Ú
_load_imgsrr      st  € ð
ØÐÐÐÐÐÐøÝð 
ð 
ð 
Ýð"ñ
ô 
ð 	
ð
øøøõ ˜1˜c‘]”]¥E¨!¨S¡M¤MÐ2€MØ€~ØˆˆåÐGÐG­C°¸Ñ,FÔ,FÐGÑGÔGÑGÔGˆàÑ€GˆWØ	Œ˜œÑ	%¨7¬<Ð+<¸1Ñ=€AØ	Œ˜œÑ	%¨7¬<Ð+<¸1Ñ=€AàÐÝ�v‘”ˆÝ�˜‘
‰OŒOˆÝ�˜‘
‰OŒOˆõ �*‰oŒo€GØð ?Ý”˜' 1 a˜µ´
Ð;Ñ;Ô;ˆˆå”˜' 1 a¨Ð+µ2´:Ð>Ñ>Ô>ˆõ " *Ñ-Ô-ð ð ‰ˆˆ9Øˆt‰8�qŠ=ˆ=Ý�LŠLÐ4°a¸!±e¸WÑEÔEÐEð —*’*˜YÑ'Ô'ˆØ—,’,ØŒ]˜GœM¨7¬<¸¼ÐFñ
ô 
ˆð ÐØ—n’n a¨ VÑ,Ô,ˆGÝŒz˜'­¬Ð4Ñ4Ô4ˆàŒ9˜Š>ˆ>Ýð=Ø?HñIñô ð ð
 	�‰ˆØð 	%ð —9’9 !�9Ñ$Ô$ˆDàˆˆa�ˆf‰ˆà€Ls   ‚	 ‰#Fc                 ó  ‡— g g }}t          t          | ¦  «        ¦  «        D ]£}t          | |¦  «        Št          ‰¦  «        sŒ"ˆfd„t          t          ‰¦  «        ¦  «        D ¦   «         }t	          |¦  «        }	|	|k    rD|                     dd¦  «        }|                     |g|	z  ¦  «         |                     |¦  «         Œ¤t	          |¦  «        }
|
dk    rt          d|z  ¦  «        ‚t          j	        |¦  «        }t          j
        ||¦  «        }t          ||||¦  «        }t          j        |
¦  «        }t          j                             d¦  «                             |¦  «         ||         ||         }}|||fS )z~Perform the actual data loading for the lfw people dataset

    This operation is meant to be cached by a joblib wrapper.
    c                 ó0   •— g | ]}t          ‰|¦  «        ‘ŒS rF   )r   )rG   ÚfÚfolder_paths     €r@   ú
<listcomp>z%_fetch_lfw_people.<locals>.<listcomp>×   s#   ø€ ÐLÐLÐL¨!•�k 1Ñ%Ô%ÐLÐLÐLrK   Ú_ú r   z*min_faces_per_person=%d is too restrictiveé*   )Úsortedr   r   r
   rY   ÚreplaceÚextendÚ
ValueErrorrZ   ÚuniqueÚsearchsortedrr   ÚarangeÚrandomÚRandomStateÚshuffle)r<   re   rf   r_   Úmin_faces_per_personÚperson_namesrd   Úperson_nameÚpathsÚ
n_picturesrl   Útarget_namesr:   rm   Úindicesrv   s                  @r@   Ú_fetch_lfw_peoplerŒ   É   s�  ø€ ð  " 2�*€LÝ�gÐ&6Ñ7Ô7Ñ8Ô8ð 	%ð 	%ˆÝÐ+¨[Ñ9Ô9ˆÝ�[Ñ!Ô!ð 	ØØLÐLÐLÐL­vµg¸kÑ6JÔ6JÑ/KÔ/KÐLÑLÔLˆÝ˜‘Z”Zˆ
ØÐ-Ò-Ð-Ø%×-Ò-¨c°3Ñ7Ô7ˆKØ×Ò  °
Ñ :Ñ;Ô;Ð;Ø×Ò˜eÑ$Ô$Ð$øå�*‰oŒo€GØ�!‚|€|ÝØ8Ð;OÑOñ
ô 
ð 	
õ ”9˜\Ñ*Ô*€LÝŒ_˜\¨<Ñ8Ô8€Få�z 6¨5°&Ñ9Ô9€Eõ Œi˜Ñ Ô €GÝ„I×Ò˜"ÑÔ×%Ò% gÑ.Ô.Ð.Ø˜'”N F¨7¤Oˆ6€EØ�&˜,Ð&Ð&rK   ÚbooleanÚneither)ÚclosedÚleftg        )
r'   r8   r_   r…   rf   re   r9   Ú
return_X_yr*   r+   )Úprefer_skip_nested_validationg      à?éF   éÃ   éN   é¬   c        
         ó~  — t          | ||||	¬¦  «        \  }
}t                               d|
¦  «         t          |
dd¬¦  «        }|                     t
          ¦  «        } ||||||¬¦  «        \  }}}|                     t          |¦  «        d¦  «        }t          d¦  «        }|r||fS t          |||||¬	¦  «        S )
a|  Load the Labeled Faces in the Wild (LFW) people dataset (classification).

    Download it if necessary.

    =================   =======================
    Classes                                5749
    Samples total                         13233
    Dimensionality                         5828
    Features            real, between 0 and 255
    =================   =======================

    For a usage example of this dataset, see
    :ref:`sphx_glr_auto_examples_applications_plot_face_recognition.py`.

    Read more in the :ref:`User Guide <labeled_faces_in_the_wild_dataset>`.

    Parameters
    ----------
    data_home : str or path-like, default=None
        Specify another download and cache folder for the datasets. By default
        all scikit-learn data is stored in '~/scikit_learn_data' subfolders.

    funneled : bool, default=True
        Download and use the funneled variant of the dataset.

    resize : float or None, default=0.5
        Ratio used to resize the each face picture. If `None`, no resizing is
        performed.

    min_faces_per_person : int, default=None
        The extracted dataset will only retain pictures of people that have at
        least `min_faces_per_person` different pictures.

    color : bool, default=False
        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.

    slice_ : tuple of slice, default=(slice(70, 195), slice(78, 172))
        Provide a custom 2D slice (height, width) to extract the
        'interesting' part of the jpeg files and avoid use statistical
        correlation from the background.

    download_if_missing : bool, default=True
        If False, raise an OSError if the data is not locally available
        instead of trying to download the data from the source site.

    return_X_y : bool, default=False
        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.

        .. versionadded:: 0.20

    n_retries : int, default=3
        Number of retries when HTTP errors are encountered.

        .. versionadded:: 1.5

    delay : float, default=1.0
        Number of seconds between retries.

        .. versionadded:: 1.5

    Returns
    -------
    dataset : :class:`~sklearn.utils.Bunch`
        Dictionary-like object, with the following attributes.

        data : numpy array of shape (13233, 2914)
            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.
        images : numpy array of shape (13233, 62, 47)
            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.
        target : numpy array of shape (13233,)
            Labels associated to each face image.
            Those labels range from 0-5748 and correspond to the person IDs.
        target_names : numpy array of shape (5749,)
            Names of all persons in the dataset.
            Position in array corresponds to the person ID in the target array.
        DESCR : str
            Description of the Labeled Faces in the Wild (LFW) dataset.

    (data, target) : tuple if ``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.

        .. versionadded:: 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
    ©r'   r8   r9   r*   r+   z Loading LFW people faces from %sé   r   ©ÚlocationÚcompressÚverbose)r_   r…   rf   re   éÿÿÿÿúlfw.rst)ÚdataÚimagesr:   rŠ   ÚDESCR)
rA   r0   r6   r   ÚcacherŒ   ÚreshaperY   r   r   )r'   r8   r_   r…   rf   re   r9   r‘   r*   r+   r(   r<   ÚmÚ	load_funcrm   r:   rŠ   ÚXÚfdescrs                      r@   Úfetch_lfw_peopler©   ô   sù   € õX "2ØØØ/ØØð"ñ "ô "Ñ€HÐõ ‡L‚LÐ3°XÑ>Ô>Ð>õ 	˜¨1°aÐ8Ñ8Ô8€AØ—’Õ)Ñ*Ô*€Ið #, )ØØØ1ØØð#ñ #ô #Ñ€Eˆ6�<ð 	�Š•c˜%‘j”j "Ñ%Ô%€Aå˜	Ñ"Ô"€Fàð Ø�&ˆyÐõ Ø�u V¸,Èfðñ ô ð rK   c           
      ó  — t          | d¦  «        5 }d„ |D ¦   «         }ddd¦  «         n# 1 swxY w Y   d„ |D ¦   «         }t          |¦  «        }t          j        |t          ¬¦  «        }	t          ¦   «         }
t          |¦  «        D �]{\  }}t          |¦  «        dk    rFd|	|<   |d         t	          |d         ¦  «        dz
  f|d         t	          |d	         ¦  «        dz
  ff}npt          |¦  «        d
k    rFd|	|<   |d         t	          |d         ¦  «        dz
  f|d	         t	          |d         ¦  «        dz
  ff}nt          d|dz   |fz  ¦  «        ‚t          |¦  «        D ]œ\  }\  }}	 t          ||¦  «        }n.# t          $ r! t          |t          |d¦  «        ¦  «        }Y nw xY wt          t          t          |¦  «        ¦  «        ¦  «        }t          |||         ¦  «        }|
                     |¦  «         Œ��Œ}t          |
|||¦  «        }t          |j        ¦  «        }|                     d¦  «        }|                     dd	¦  «         |                     d|d	z  ¦  «         ||_        ||	t          j        ddg¦  «        fS )z}Perform the actual data loading for the LFW pairs dataset

    This operation is meant to be cached by a joblib wrapper.
    Úrbc                 ó€   — g | ];}|                      ¦   «                              ¦   «                              d ¦  «        ‘Œ<S )ú	)ÚdecodeÚstripÚsplit)rG   Úlns     r@   rw   z$_fetch_lfw_pairs.<locals>.<listcomp>³  s:   € ÐLÐLÐL¸2�r—y’y‘{”{×(Ò(Ñ*Ô*×0Ò0°Ñ6Ô6ÐLÐLÐLrK   Nc                 ó8   — g | ]}t          |¦  «        d k    ¯|‘ŒS )r   )rY   )rG   Úsls     r@   rw   z$_fetch_lfw_pairs.<locals>.<listcomp>´  s#   € Ð:Ð:Ð:˜­c°"©g¬g¸ªk¨k�"¨k¨k¨krK   rL   r$   r   r   r   é   zinvalid line %d: %rzUTF-8zDifferent personszSame person)r7   rY   rZ   r[   rX   Úlistr]   r~   r   Ú	TypeErrorÚstrr{   r   Úappendrr   ÚshapeÚpopÚinsertÚarray)Úindex_file_pathr<   re   rf   r_   Ú
index_fileÚsplit_linesÚ
pair_specsÚn_pairsr:   rd   rn   Ú
componentsÚpairÚjÚnameÚidxÚperson_folderÚ	filenamesro   Úpairsr¹   rl   s                          r@   Ú_fetch_lfw_pairsrÊ   ©  sý  € õ 
ˆo˜tÑ	$Ô	$ð M¨
ØLÐLÀÐLÑLÔLˆðMð Mð Mñ Mô Mð Mð Mð Mð Mð Mð Møøøð Mð Mð Mð Mà:Ð:˜{Ð:Ñ:Ô:€JÝ�*‰oŒo€Gõ ŒX�g¥SÐ)Ñ)Ô)€FÝ‘”€JÝ" :Ñ.Ô.ð )ñ )‰ˆˆ:Ýˆz‰?Œ?˜aÒÐØˆF�1‰Ià˜A”¥ J¨q¤MÑ 2Ô 2°QÑ 6Ð7Ø˜A”¥ J¨q¤MÑ 2Ô 2°QÑ 6Ð7ðˆDˆDõ �‰_Œ_ Ò!Ð!ØˆF�1‰Ià˜A”¥ J¨q¤MÑ 2Ô 2°QÑ 6Ð7Ø˜A”¥ J¨q¤MÑ 2Ô 2°QÑ 6Ð7ðˆDˆDõ
 Ð2°a¸!±e¸ZÐ5HÑHÑIÔIÐIÝ'¨™oœoð 	)ð 	)‰NˆA‰{��cðKÝ $Ð%5°tÑ <Ô <��øÝð Kð Kð KÝ $Ð%5µs¸4ÀÑ7IÔ7IÑ JÔ J���ðKøøøå�V¥G¨MÑ$:Ô$:Ñ;Ô;Ñ<Ô<ˆIÝ˜]¨I°c¬NÑ;Ô;ˆIØ×Ò˜iÑ(Ô(Ð(Ð(ñ	)õ �z 6¨5°&Ñ9Ô9€EÝ�”ÑÔ€EØ�iŠi˜‰lŒl€GØ	‡L‚L��AÑÔÐØ	‡L‚L��G˜q‘LÑ!Ô!Ð!Ø€E„Kà�&�"œ(Ð$7¸Ð#GÑHÔHÐHÐHs   ‘*ª.±.Å/F Æ (F+Æ*F+>   ÚtestÚtrainÚ10_folds)	Úsubsetr'   r8   r_   rf   re   r9   r*   r+   rÌ   c        	         ó2  — t          |||||¬¦  «        \  }	}
t                               d| |	¦  «         t          |	dd¬¦  «        }|                     t
          ¦  «        }dddd	œ}| |vrAt          d
| ›dt          t          | 	                    ¦   «         ¦  «        ¦  «        ›�¦  «        ‚t          |	||          ¦  «        } |||
|||¬¦  «        \  }}}t          d¦  «        }t          |                     t          |¦  «        d¦  «        ||||¬¦  «        S )a:  Load the Labeled Faces in the Wild (LFW) pairs dataset (classification).

    Download it if necessary.

    =================   =======================
    Classes                                   2
    Samples total                         13233
    Dimensionality                         5828
    Features            real, between 0 and 255
    =================   =======================

    In the official `README.txt`_ this task is described as the
    "Restricted" task.  As I am not sure as to implement the
    "Unrestricted" variant correctly, I left it as unsupported for now.

      .. _`README.txt`: http://vis-www.cs.umass.edu/lfw/README.txt

    The original images are 250 x 250 pixels, but the default slice and resize
    arguments reduce them to 62 x 47.

    Read more in the :ref:`User Guide <labeled_faces_in_the_wild_dataset>`.

    Parameters
    ----------
    subset : {'train', 'test', '10_folds'}, default='train'
        Select the dataset to load: 'train' for the development training
        set, 'test' for the development test set, and '10_folds' for the
        official evaluation set that is meant to be used with a 10-folds
        cross validation.

    data_home : str or path-like, default=None
        Specify another download and cache folder for the datasets. By
        default all scikit-learn data is stored in '~/scikit_learn_data'
        subfolders.

    funneled : bool, default=True
        Download and use the funneled variant of the dataset.

    resize : float, default=0.5
        Ratio used to resize the each face picture.

    color : bool, default=False
        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.

    slice_ : tuple of slice, default=(slice(70, 195), slice(78, 172))
        Provide a custom 2D slice (height, width) to extract the
        'interesting' part of the jpeg files and avoid use statistical
        correlation from the background.

    download_if_missing : bool, default=True
        If False, raise an OSError if the data is not locally available
        instead of trying to download the data from the source site.

    n_retries : int, default=3
        Number of retries when HTTP errors are encountered.

        .. versionadded:: 1.5

    delay : float, default=1.0
        Number of seconds between retries.

        .. versionadded:: 1.5

    Returns
    -------
    data : :class:`~sklearn.utils.Bunch`
        Dictionary-like object, with the following attributes.

        data : ndarray of shape (2200, 5828). Shape depends on ``subset``.
            Each row corresponds to 2 ravel'd face images
            of original size 62 x 47 pixels.
            Changing the ``slice_``, ``resize`` or ``subset`` parameters
            will change the shape of the output.
        pairs : ndarray of shape (2200, 2, 62, 47). Shape depends on ``subset``
            Each row has 2 face images corresponding
            to same or different person from the dataset
            containing 5749 people. Changing the ``slice_``,
            ``resize`` or ``subset`` parameters will change the shape of the
            output.
        target : numpy array of shape (2200,). Shape depends on ``subset``.
            Labels associated to each pair of images.
            The two label values being different persons or the same person.
        target_names : numpy array of shape (2,)
            Explains the target values of the target array.
            0 corresponds to "Different person", 1 corresponds to "same person".
        DESCR : str
            Description of the Labeled Faces in the Wild (LFW) dataset.

    Examples
    --------
    >>> from sklearn.datasets import fetch_lfw_pairs
    >>> lfw_pairs_train = fetch_lfw_pairs(subset='train')
    >>> list(lfw_pairs_train.target_names)
    [np.str_('Different persons'), np.str_('Same person')]
    >>> lfw_pairs_train.pairs.shape
    (2200, 2, 62, 47)
    >>> lfw_pairs_train.data.shape
    (2200, 5828)
    >>> lfw_pairs_train.target.shape
    (2200,)
    r˜   zLoading %s LFW pairs from %sr™   r   rš   r   r    r"   )rÌ   rË   rÍ   zsubset='z' is invalid: should be one of )r_   rf   re   rŸ   rž   )r    rÉ   r:   rŠ   r¢   )rA   r0   r6   r   r£   rÊ   r~   rµ   r{   Úkeysr   r   r   r¤   rY   )rÎ   r'   r8   r_   rf   re   r9   r*   r+   r(   r<   r¥   r¦   Úlabel_filenamesr½   rÉ   r:   rŠ   r¨   s                      r@   Úfetch_lfw_pairsrÒ   Ý  s`  € õB "2ØØØ/ØØð"ñ "ô "Ñ€HÐõ ‡L‚LÐ/°¸ÑBÔBÐBõ 	˜¨1°aÐ8Ñ8Ô8€AØ—’Õ(Ñ)Ô)€Ið %Ø"Øðð €Oð
 �_Ð$Ð$Ýˆjàˆvˆv•t�F ?×#7Ò#7Ñ#9Ô#9Ñ:Ô:Ñ;Ô;Ð;ð=ñ
ô 
ð 	
õ ˜8 _°VÔ%<Ñ=Ô=€Oð #, )ØÐ)°&ÀÈfð#ñ #ô #Ñ€Eˆ6�<õ ˜	Ñ"Ô"€Fõ Ø�]Š]�3˜u™:œ: rÑ*Ô*ØØØ!Øðñ ô ð rK   )NTTr$   r%   )NFNr   )NFN)/Ú__doc__ÚloggingÚnumbersr   r   Úosr   r   r   r   Úos.pathr	   r
   r   ÚnumpyrZ   Újoblibr   Úutilsr   Úutils._param_validationr   r   r   r   Úutils.fixesr   Ú_baser   r   r   r   Ú	getLoggerÚ__name__r0   r4   r3   r/   rA   rr   rŒ   r·   rR   rQ   r©   rÊ   rÒ   rF   rK   r@   ú<module>rà      sz  ððð ð €€€Ø "Ð "Ð "Ð "Ð "Ð "Ð "Ð "Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'à Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SØ ,Ð ,Ð ,Ð ,Ð ,Ð ,ðð ð ð ð ð ð ð ð ð ð ð ð 
ˆÔ	˜8Ñ	$Ô	$€ð Ð
ØØ8ØOðñ ô €ð &Ð%ØØ8ØOðñ ô Ð ð ÐØ$Ø<ØSðñ ô ð
 ÐØ#Ø<ØSðñ ô ð
 ÐØØ<ØSðñ ô ð€ð4 QTð/&ð /&ð /&ð /&ðdBð Bð BðV STð('ð ('ð ('ð ('ðV €à˜8 TÐ*Ø�KØ�8˜D ! T°)Ð<Ñ<Ô<¸dÐCØ!) ¨(°A°tÀFÐ!KÑ!KÔ!KÈTÐ RØ�Ø˜&˜& ™,œ,Ð'Ø )˜{Ø �kØ�h˜x¨¨D¸Ð@Ñ@Ô@ÐAØ�(˜4  d°9Ð=Ñ=Ô=Ð>ðð ð #'ðñ ô ð" ØØØØ
ØˆE�"�c‰NŒN˜E˜E " c™NœNÐ+ØØØØ
ð^ð ^ð ^ð ^ñô ð^ðN IMð1Ið 1Ið 1Ið 1Iðh €à�:Ð;Ð;Ð;Ñ<Ô<Ð=Ø˜8 TÐ*Ø�KØ�8˜D ! T°)Ð<Ñ<Ô<¸dÐCØ�Ø˜&˜& ™,œ,Ð'Ø )˜{Ø�h˜x¨¨D¸Ð@Ñ@Ô@ÐAØ�(˜4  d°9Ð=Ñ=Ô=Ð>ð
ð 
ð #'ðñ ô ð  ØØØØ
ØˆE�"�c‰NŒN˜E˜E " c™NœNÐ+ØØØ
ð\ð \ð \ð \ñô ð\ð \ð \rK   