neulab/docprompting-conala huggingface dataset:
sklearn.datasets.fetch_kddcup99  
sklearn.datasets.fetch_kddcup99(*, subset=None, data_home=None, shuffle=False, random_state=None, percent10=True, download_if_missing=True, return_X_y=False, as_frame=False) [source]
 
Load the kddcup99 dataset (classification). Download it if necessary.  
Classes 23  
Samples total 4898431  
Dimensionality 41  
Features discrete (int) or continuous (float)   Read more in the User Guide.  New in version 0.18.   Parameters 
 
subset{‘SA’, ‘SF’, ‘http’, ‘smtp’}, default=None 

To return the corresponding classical subsets of kddcup 99. If None, return the entire kddcup 99 dataset.  
data_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders. .. versionadded:: 0.19  
shufflebool, default=False 

Whether to shuffle dataset.  
random_stateint, RandomState instance or None, default=None 

Determines random number generation for dataset shuffling and for selection of abnormal samples if subset='SA'. Pass an int for reproducible output across multiple function calls. See Glossary.  
percent10bool, default=True 

Whether to load only 10 percent of the data.  
download_if_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.  
return_X_ybool, default=False 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.20.   
as_framebool, default=False 

If True, returns a pandas Dataframe for the data and target objects in the Bunch returned object; Bunch return object will also have a frame member.  New in version 0.24.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
data{ndarray, dataframe} of shape (494021, 41) 

The data matrix to learn. If as_frame=True, data will be a pandas DataFrame.  
target{ndarray, series} of shape (494021,) 

The regression target for each sample. If as_frame=True, target will be a pandas Series.  
framedataframe of shape (494021, 42) 

Only present when as_frame=True. Contains data and target.  
DESCRstr 

The full description of the dataset.  
feature_nameslist 

The names of the dataset columns  target_names: list

The names of the target columns    
(data, target)tuple if return_X_y is True 

 New in version 0.20.
sklearn.datasets.fetch_lfw_pairs  
sklearn.datasets.fetch_lfw_pairs(*, subset='train', data_home=None, funneled=True, resize=0.5, color=False, slice_=slice(70, 195, None), slice(78, 172, None), download_if_missing=True) [source]
 
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. 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 User Guide.  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_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.  
funneledbool, default=True 

Download and use the funneled variant of the dataset.  
resizefloat, default=0.5 

Ratio used to resize the each face picture.  
colorbool, 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_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.    Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
datandarray 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.  
pairsndarray 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.  
targetnumpy 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.  
DESCRstring 

Description of the Labeled Faces in the Wild (LFW) dataset.
sklearn.datasets.fetch_lfw_people  
sklearn.datasets.fetch_lfw_people(*, data_home=None, funneled=True, resize=0.5, min_faces_per_person=0, color=False, slice_=slice(70, 195, None), slice(78, 172, None), download_if_missing=True, return_X_y=False) [source]
 
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   Read more in the User Guide.  Parameters 
 
data_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.  
funneledbool, default=True 

Download and use the funneled variant of the dataset.  
resizefloat, default=0.5 

Ratio used to resize the each face picture.  
min_faces_per_personint, default=None 

The extracted dataset will only retain pictures of people that have at least min_faces_per_person different pictures.  
colorbool, 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_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.  
return_X_ybool, 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.  New in version 0.20.     Returns 
 
datasetBunch 

Dictionary-like object, with the following attributes.  
datanumpy 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.  
imagesnumpy 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.  
targetnumpy array of shape (13233,) 

Labels associated to each face image. Those labels range from 0-5748 and correspond to the person IDs.  
DESCRstring 

Description of the Labeled Faces in the Wild (LFW) dataset.    
(data, target)tuple if return_X_y is True 

 New in version 0.20.      
 Examples using sklearn.datasets.fetch_lfw_people
 
  Faces recognition example using eigenfaces and SVMs
sklearn.datasets.fetch_olivetti_faces  
sklearn.datasets.fetch_olivetti_faces(*, data_home=None, shuffle=False, random_state=0, download_if_missing=True, return_X_y=False) [source]
 
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.  Parameters 
 
data_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.  
shufflebool, default=False 

If True the order of the dataset is shuffled to avoid having images of the same person grouped.  
random_stateint, RandomState instance or None, default=0 

Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls. See Glossary.  
download_if_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.  
return_X_ybool, default=False 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.22.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  data: ndarray, shape (400, 4096)

Each row corresponds to a ravelled face image of original size 64 x 64 pixels.  
imagesndarray, shape (400, 64, 64) 

Each row is a face image corresponding to one of the 40 subjects of the dataset.  
targetndarray, shape (400,) 

Labels associated to each face image. Those labels are ranging from 0-39 and correspond to the Subject IDs.  
DESCRstr 

Description of the modified Olivetti Faces Dataset.    
(data, target)tuple if return_X_y=True 

 New in version 0.22.      
 Examples using sklearn.datasets.fetch_olivetti_faces
 
  Online learning of a dictionary of parts of faces  

  Faces dataset decompositions  

  Pixel importances with a parallel forest of trees  

  Face completion with a multi-output estimators
sklearn.datasets.fetch_rcv1  
sklearn.datasets.fetch_rcv1(*, data_home=None, subset='all', download_if_missing=True, random_state=None, shuffle=False, return_X_y=False) [source]
 
Load the RCV1 multilabel dataset (classification). Download it if necessary. Version: RCV1-v2, vectors, full sets, topics multilabels.  
Classes 103  
Samples total 804414  
Dimensionality 47236  
Features real, between 0 and 1   Read more in the User Guide.  New in version 0.17.   Parameters 
 
data_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.  
subset{‘train’, ‘test’, ‘all’}, default=’all’ 

Select the dataset to load: ‘train’ for the training set (23149 samples), ‘test’ for the test set (781265 samples), ‘all’ for both, with the training samples first if shuffle is False. This follows the official LYRL2004 chronological split.  
download_if_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.  
random_stateint, RandomState instance or None, default=None 

Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls. See Glossary.  
shufflebool, default=False 

Whether to shuffle dataset.  
return_X_ybool, 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.  New in version 0.20.     Returns 
 
datasetBunch 

Dictionary-like object, with the following attributes.  
datasparse matrix of shape (804414, 47236), dtype=np.float64 

The array has 0.16% of non zero values. Will be of CSR format.  
targetsparse matrix of shape (804414, 103), dtype=np.uint8 

Each sample has a value of 1 in its categories, and 0 in others. The array has 3.15% of non zero values. Will be of CSR format.  
sample_idndarray of shape (804414,), dtype=np.uint32, 

Identification number of each sample, as ordered in dataset.data.  
target_namesndarray of shape (103,), dtype=object 

Names of each target (RCV1 topics), as ordered in dataset.target.  
DESCRstr 

Description of the RCV1 dataset.    
(data, target)tuple if return_X_y is True 

 New in version 0.20.
sklearn.datasets.fetch_species_distributions  
sklearn.datasets.fetch_species_distributions(*, data_home=None, download_if_missing=True) [source]
 
Loader for species distribution dataset from Phillips et. al. (2006) Read more in the User Guide.  Parameters 
 
data_homestr, default=None 

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.  
download_if_missingbool, default=True 

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.    Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
coveragesarray, shape = [14, 1592, 1212] 

These represent the 14 features measured at each point of the map grid. The latitude/longitude values for the grid are discussed below. Missing data is represented by the value -9999.  
trainrecord array, shape = (1624,) 

The training points for the data. Each point has three fields:  train[‘species’] is the species name train[‘dd long’] is the longitude, in degrees train[‘dd lat’] is the latitude, in degrees   
testrecord array, shape = (620,) 

The test points for the data. Same format as the training data.  
Nx, Nyintegers 

The number of longitudes (x) and latitudes (y) in the grid  
x_left_lower_corner, y_left_lower_cornerfloats 

The (x,y) position of the lower-left corner, in degrees  
grid_sizefloat 

The spacing between points of the grid, in degrees       Notes This dataset represents the geographic distribution of species. The dataset is provided by Phillips et. al. (2006). The two species are:  
“Bradypus variegatus” , the Brown-throated Sloth. 
“Microryzomys minutus” , also known as the Forest Small Rice Rat, a rodent that lives in Peru, Colombia, Ecuador, Peru, and Venezuela. For an example of using this dataset with scikit-learn, see examples/applications/plot_species_distribution_modeling.py.  References  
“Maximum entropy modeling of species geographic distributions” S. J. Phillips, R. P. Anderson, R. E. Schapire - Ecological Modelling, 190:231-259, 2006.  
 Examples using sklearn.datasets.fetch_species_distributions
 
  Species distribution modeling  

  Kernel Density Estimate of Species Distributions
sklearn.datasets.get_data_home  
sklearn.datasets.get_data_home(data_home=None) → str[source]
 
Return the path of the scikit-learn data dir. This folder is used by some large dataset loaders to avoid downloading the data several times. By default the data dir is set to a folder named ‘scikit_learn_data’ in the user home folder. Alternatively, it can be set by the ‘SCIKIT_LEARN_DATA’ environment variable or programmatically by giving an explicit folder path. The ‘~’ symbol is expanded to the user home folder. If the folder does not already exist, it is automatically created.  Parameters 
 
data_homestr, default=None 

The path to scikit-learn data directory. If None, the default path is ~/sklearn_learn_data.     
 Examples using sklearn.datasets.get_data_home
 
  Out-of-core classification of text documents
sklearn.datasets.load_boston  
sklearn.datasets.load_boston(*, return_X_y=False) [source]
 
Load and return the boston house-prices dataset (regression).  
Samples total 506  
Dimensionality 13  
Features real, positive  
Targets real 5. - 50.   Read more in the User Guide.  Parameters 
 
return_X_ybool, default=False 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.18.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
datandarray of shape (506, 13) 

The data matrix.  
targetndarray of shape (506, ) 

The regression target.  
filenamestr 

The physical location of boston csv dataset.  New in version 0.20.   
DESCRstr 

The full description of the dataset.  
feature_namesndarray 

The names of features    
(data, target)tuple if return_X_y is True 

 New in version 0.18.      Notes  Changed in version 0.20: Fixed a wrong data point at [445, 0].  Examples >>> from sklearn.datasets import load_boston
>>> X, y = load_boston(return_X_y=True)
>>> print(X.shape)
(506, 13)
sklearn.datasets.load_breast_cancer  
sklearn.datasets.load_breast_cancer(*, return_X_y=False, as_frame=False) [source]
 
Load and return the breast cancer wisconsin dataset (classification). The breast cancer dataset is a classic and very easy binary classification dataset.  
Classes 2  
Samples per class 212(M),357(B)  
Samples total 569  
Dimensionality 30  
Features real, positive   Read more in the User Guide.  Parameters 
 
return_X_ybool, default=False 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.18.   
as_framebool, default=False 

If True, the data is a pandas DataFrame including columns with appropriate dtypes (numeric). The target is a pandas DataFrame or Series depending on the number of target columns. If return_X_y is True, then (data, target) will be pandas DataFrames or Series as described below.  New in version 0.23.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
data{ndarray, dataframe} of shape (569, 30) 

The data matrix. If as_frame=True, data will be a pandas DataFrame.  target: {ndarray, Series} of shape (569,)

The classification target. If as_frame=True, target will be a pandas Series.  feature_names: list

The names of the dataset columns.  target_names: list

The names of target classes.  frame: DataFrame of shape (569, 31)

Only present when as_frame=True. DataFrame with data and target.  New in version 0.23.   DESCR: str

The full description of the dataset.  filename: str

The path to the location of the data.  New in version 0.20.     
(data, target)tuple if return_X_y is True 

 New in version 0.18.   The copy of UCI ML Breast Cancer Wisconsin (Diagnostic) dataset is
downloaded from:
https://goo.gl/U2Uwz2
   Examples Let’s say you are interested in the samples 10, 50, and 85, and want to know their class name. >>> from sklearn.datasets import load_breast_cancer
>>> data = load_breast_cancer()
>>> data.target[[10, 50, 85]]
array([0, 1, 0])
>>> list(data.target_names)
['malignant', 'benign']
 
 Examples using sklearn.datasets.load_breast_cancer
 
  Post pruning decision trees with cost complexity pruning  

  Permutation Importance with Multicollinear or Correlated Features  

  Effect of varying threshold for self-training
sklearn.datasets.load_diabetes  
sklearn.datasets.load_diabetes(*, return_X_y=False, as_frame=False) [source]
 
Load and return the diabetes dataset (regression).  
Samples total 442  
Dimensionality 10  
Features real, -.2 < x < .2  
Targets integer 25 - 346   Read more in the User Guide.  Parameters 
 
return_X_ybool, default=False. 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.18.   
as_framebool, default=False 

If True, the data is a pandas DataFrame including columns with appropriate dtypes (numeric). The target is a pandas DataFrame or Series depending on the number of target columns. If return_X_y is True, then (data, target) will be pandas DataFrames or Series as described below.  New in version 0.23.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
data{ndarray, dataframe} of shape (442, 10) 

The data matrix. If as_frame=True, data will be a pandas DataFrame.  target: {ndarray, Series} of shape (442,)

The regression target. If as_frame=True, target will be a pandas Series.  feature_names: list

The names of the dataset columns.  frame: DataFrame of shape (442, 11)

Only present when as_frame=True. DataFrame with data and target.  New in version 0.23.   DESCR: str

The full description of the dataset.  data_filename: str

The path to the location of the data.  target_filename: str

The path to the location of the target.    
(data, target)tuple if return_X_y is True 

 New in version 0.18.      
 Examples using sklearn.datasets.load_diabetes
 
  Plot individual and voting regression predictions  

  Gradient Boosting regression  

  Model Complexity Influence  

  Model-based and sequential feature selection  

  Lasso path using LARS  

  Linear Regression Example  

  Sparsity Example: Fitting only features 1 and 2  

  Lasso and Elastic Net  

  Lasso model selection: Cross-Validation / AIC / BIC  

  Advanced Plotting With Partial Dependence  

  Imputing missing values before building an estimator  

  Plotting Cross-Validated Predictions  

  Cross-validation on diabetes Dataset Exercise
sklearn.datasets.load_linnerud  
sklearn.datasets.load_linnerud(*, return_X_y=False, as_frame=False) [source]
 
Load and return the physical excercise linnerud dataset. This dataset is suitable for multi-ouput regression tasks.  
Samples total 20  
Dimensionality 3 (for both data and target)  
Features integer  
Targets integer   Read more in the User Guide.  Parameters 
 
return_X_ybool, default=False 

If True, returns (data, target) instead of a Bunch object. See below for more information about the data and target object.  New in version 0.18.   
as_framebool, default=False 

If True, the data is a pandas DataFrame including columns with appropriate dtypes (numeric, string or categorical). The target is a pandas DataFrame or Series depending on the number of target columns. If return_X_y is True, then (data, target) will be pandas DataFrames or Series as described below.  New in version 0.23.     Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
data{ndarray, dataframe} of shape (20, 3) 

The data matrix. If as_frame=True, data will be a pandas DataFrame.  target: {ndarray, dataframe} of shape (20, 3)

The regression targets. If as_frame=True, target will be a pandas DataFrame.  feature_names: list

The names of the dataset columns.  target_names: list

The names of the target columns.  frame: DataFrame of shape (20, 6)

Only present when as_frame=True. DataFrame with data and target.  New in version 0.23.   DESCR: str

The full description of the dataset.  data_filename: str

The path to the location of the data.  target_filename: str

The path to the location of the target.  New in version 0.20.     
(data, target)tuple if return_X_y is True 

 New in version 0.18.
sklearn.datasets.load_sample_image  
sklearn.datasets.load_sample_image(image_name) [source]
 
Load the numpy array of a single sample image Read more in the User Guide.  Parameters 
 
image_name{china.jpg, flower.jpg} 

The name of the sample image loaded    Returns 
 
img3D array 

The image as a numpy array: height x width x color     Examples >>> from sklearn.datasets import load_sample_image
>>> china = load_sample_image('china.jpg')   
>>> china.dtype                              
dtype('uint8')
>>> china.shape                              
(427, 640, 3)
>>> flower = load_sample_image('flower.jpg') 
>>> flower.dtype                             
dtype('uint8')
>>> flower.shape                             
(427, 640, 3)
 
 Examples using sklearn.datasets.load_sample_image
 
  Color Quantization using K-Means
sklearn.datasets.load_sample_images  
sklearn.datasets.load_sample_images() [source]
 
Load sample images for image manipulation. Loads both, china and flower. Read more in the User Guide.  Returns 
 
dataBunch 

Dictionary-like object, with the following attributes.  
imageslist of ndarray of shape (427, 640, 3) 

The two sample image.  
filenameslist 

The filenames for the images.  
DESCRstr 

The full description of the dataset.       Examples To load the data and visualize the images: >>> from sklearn.datasets import load_sample_images
>>> dataset = load_sample_images()     
>>> len(dataset.images)                
2
>>> first_img_data = dataset.images[0] 
>>> first_img_data.shape               
(427, 640, 3)
>>> first_img_data.dtype               
dtype('uint8')