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
StandardDatasetfor a description of the arguments.By default, this code converts the ‘age’ attribute to a binary value where privileged is
age >= 25and unprivileged isage < 25as inGermanDataset.Methods
align_datasetsAlign the other dataset features, labels and protected_attributes to this dataset. convert_to_dataframeConvert the StructuredDataset to a pandas.DataFrame.copyConvenience method to return a copy of this dataset. export_datasetExport the dataset and supporting attributes TODO: The preferred file format is HDF import_datasetImport the dataset and supporting attributes TODO: The preferred file format is HDF splitSplit this dataset into multiple partitions. subsetSubset of dataset based on position :param indexes: iterable which contains row indexes temporarily_ignoreTemporarily add the fields provided to ignore_fields.validate_datasetError 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
StandardDatasetfor a description of the arguments.By default, this code converts the ‘age’ attribute to a binary value where privileged is
age >= 25and unprivileged isage < 25as inGermanDataset.
-