alibi.datasets.default module
- alibi.datasets.default.fetch_adult(features_drop=None, return_X_y=False, url_id=0)[source]
Downloads and pre-processes ‘adult’ dataset. More info: http://mlr.cs.umass.edu/ml/machine-learning-databases/adult/
- Parameters:
- Return type:
- Returns:
Bunch – Dataset, labels, a list of features and a dictionary containing a list with the potential categories for each categorical feature where the key refers to the feature column.
(data, target) – Tuple if
return_X_y=True
- alibi.datasets.default.fetch_imagenet(category='Persian cat', nb_images=10, target_size=(299, 299), min_std=10.0, seed=42, return_X_y=False)[source]
- Return type:
- alibi.datasets.default.fetch_imagenet_10(url_id=0)[source]
Sample dataset extracted from imagenet in a dictionary format. The train set contains 1000 random samples, 100 for each of the following 10 selected classes:
stingray
trilobite
centipede
slug
snail
Rhodesian ridgeback
beagle
golden retriever
sea lion
espresso
The test set contains 50 random samples, 5 for each of the classes above.
- Parameters:
url_id (
int
) – Index specifying which URL to use for downloading.- Return type:
- Returns:
Dictionary with the following keys –
trainset - train set tuple (X_train, y_train)
testset - test set tuple (X_test, y_test)
int_to_str_labels - map from target to target name
str_to_int_labels - map from target name to target
- alibi.datasets.default.fetch_movie_sentiment(return_X_y=False, url_id=0)[source]
The movie review dataset, equally split between negative and positive reviews.
- Parameters:
- Return type:
- Returns:
Bunch – Movie reviews and sentiment labels (0 means ‘negative’ and 1 means ‘positive’).
(data, target) – Tuple if
return_X_y=True
.
- alibi.datasets.default.load_cats(target_size=(299, 299), return_X_y=False)[source]
A small sample of Imagenet-like public domain images of cats used primarily for examples. The images were hand-collected using flickr.com by searching for various cat types, filtered by images in the public domain.
- Parameters:
- Return type:
- Returns:
Bunch – Bunch object with fields ‘data’, ‘target’ and ‘target_names’. Both targets and target_names are taken from the original Imagenet.
(data, target) – Tuple if
return_X_y=True
.