§
    0PhB  ã                   ó8  — d Z ddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlmZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ ddlmZ ddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2 ddl3m4Z4 ddl5m6Z6m7Z7m8Z8 ddl9m:Z:m;Z; g d¢Z<d„ Z=dS )zBUtilities to load popular datasets and artificial data generators.é    Né   )Úclear_data_homeÚ
fetch_fileÚget_data_homeÚload_breast_cancerÚload_diabetesÚload_digitsÚ
load_filesÚ	load_irisÚload_linnerudÚload_sample_imageÚload_sample_imagesÚ	load_wine)Úfetch_california_housing)Úfetch_covtype)Úfetch_kddcup99)Úfetch_lfw_pairsÚfetch_lfw_people)Úfetch_olivetti_faces)Úfetch_openml)Ú
fetch_rcv1)Úmake_biclustersÚ
make_blobsÚmake_checkerboardÚmake_circlesÚmake_classificationÚmake_friedman1Úmake_friedman2Úmake_friedman3Úmake_gaussian_quantilesÚmake_hastie_10_2Úmake_low_rank_matrixÚ
make_moonsÚmake_multilabel_classificationÚmake_regressionÚmake_s_curveÚmake_sparse_coded_signalÚmake_sparse_spd_matrixÚmake_sparse_uncorrelatedÚmake_spd_matrixÚmake_swiss_roll)Úfetch_species_distributions)Údump_svmlight_fileÚload_svmlight_fileÚload_svmlight_files)Úfetch_20newsgroupsÚfetch_20newsgroups_vectorized).r   r-   r0   r1   r   r   r   r   r,   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r.   r/   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   c                 ó¨   — | dk    r#t          j        d¦  «        }t          |¦  «        ‚	 t          ¦   «         |          S # t          $ r t
          ‚w xY w)NÚload_bostonaí  
            `load_boston` has been removed from scikit-learn since version 1.2.

            The Boston housing prices dataset has an ethical problem: as
            investigated in [1], the authors of this dataset engineered a
            non-invertible variable "B" assuming that racial self-segregation had a
            positive impact on house prices [2]. Furthermore the goal of the
            research that led to the creation of this dataset was to study the
            impact of air quality but it did not give adequate demonstration of the
            validity of this assumption.

            The scikit-learn maintainers therefore strongly discourage the use of
            this dataset unless the purpose of the code is to study and educate
            about ethical issues in data science and machine learning.

            In this special case, you can fetch the dataset from the original
            source::

                import pandas as pd
                import numpy as np

                data_url = "http://lib.stat.cmu.edu/datasets/boston"
                raw_df = pd.read_csv(data_url, sep="\s+", skiprows=22, header=None)
                data = np.hstack([raw_df.values[::2, :], raw_df.values[1::2, :2]])
                target = raw_df.values[1::2, 2]

            Alternative datasets include the California housing dataset and the
            Ames housing dataset. You can load the datasets as follows::

                from sklearn.datasets import fetch_california_housing
                housing = fetch_california_housing()

            for the California housing dataset and::

                from sklearn.datasets import fetch_openml
                housing = fetch_openml(name="house_prices", as_frame=True)

            for the Ames housing dataset.

            [1] M Carlisle.
            "Racist data destruction?"
            <https://medium.com/@docintangible/racist-data-destruction-113e3eff54a8>

            [2] Harrison Jr, David, and Daniel L. Rubinfeld.
            "Hedonic housing prices and the demand for clean air."
            Journal of environmental economics and management 5.1 (1978): 81-102.
            <https://www.researchgate.net/publication/4974606_Hedonic_housing_prices_and_the_demand_for_clean_air>
            )ÚtextwrapÚdedentÚImportErrorÚglobalsÚKeyErrorÚAttributeError)ÚnameÚmsgs     úY/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/datasets/__init__.pyÚ__getattr__r=   m   sh   € Øˆ}ÒÐÝŒoð/ñ1
ô 1
ˆõd ˜#ÑÔÐðÝ‰yŒy˜ŒÐøÝð ð ð åÐðøøøs	   «? ¿A)>Ú__doc__r4   Ú_baser   r   r   r   r   r	   r
   r   r   r   r   r   Ú_california_housingr   Ú_covtyper   Ú	_kddcup99r   Ú_lfwr   r   Ú_olivetti_facesr   Ú_openmlr   Ú_rcv1r   Ú_samples_generatorr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   Ú_species_distributionsr,   Ú_svmlight_format_ior-   r.   r/   Ú_twenty_newsgroupsr0   r1   Ú__all__r=   © ó    r<   ú<module>rN      s‘  ðØ HÐ Hð
 €€€ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð :Ð 9Ð 9Ð 9Ð 9Ð 9Ø #Ð #Ð #Ð #Ð #Ð #Ø %Ð %Ð %Ð %Ð %Ð %Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø !Ð !Ð !Ð !Ð !Ð !Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð, @Ð ?Ð ?Ð ?Ð ?Ð ?ðð ð ð ð ð ð ð ð ð ð
 RÐ QÐ QÐ QÐ QÐ QÐ QÐ Qð/ð /ð /€ðd9ð 9ð 9ð 9ð 9rM   