aif360.datasets
.BankDataset¶
-
class
aif360.datasets.
BankDataset
(label_name='y', favorable_classes=['yes'], protected_attribute_names=['age'], privileged_classes=[<function BankDataset.<lambda>>], instance_weights_name=None, categorical_features=['job', 'marital', 'education', 'default', 'housing', 'loan', 'contact', 'month', 'day_of_week', 'poutcome'], features_to_keep=[], features_to_drop=[], na_values=['unknown'], custom_preprocessing=None, metadata=None)[source]¶ Bank marketing Dataset.
See
aif360/data/raw/bank/README.md
.See
StandardDataset
for a description of the arguments.By default, this code converts the ‘age’ attribute to a binary value where privileged is
age >= 25
and unprivileged isage < 25
as inGermanDataset
.Methods
align_datasets
Align the other dataset features, labels and protected_attributes to this dataset. convert_to_dataframe
Convert the StructuredDataset to a pandas.DataFrame
.copy
Convenience method to return a copy of this dataset. export_dataset
Export the dataset and supporting attributes TODO: The preferred file format is HDF import_dataset
Import the dataset and supporting attributes TODO: The preferred file format is HDF split
Split this dataset into multiple partitions. subset
Subset of dataset based on position :param indexes: iterable which contains row indexes temporarily_ignore
Temporarily add the fields provided to ignore_fields
.validate_dataset
Error checking and type validation. -
__init__
(label_name='y', favorable_classes=['yes'], protected_attribute_names=['age'], privileged_classes=[<function BankDataset.<lambda>>], instance_weights_name=None, categorical_features=['job', 'marital', 'education', 'default', 'housing', 'loan', 'contact', 'month', 'day_of_week', 'poutcome'], features_to_keep=[], features_to_drop=[], na_values=['unknown'], custom_preprocessing=None, metadata=None)[source]¶ See
StandardDataset
for a description of the arguments.By default, this code converts the ‘age’ attribute to a binary value where privileged is
age >= 25
and unprivileged isage < 25
as inGermanDataset
.
-