aif360.datasets
.BinaryLabelDataset¶
-
class
aif360.datasets.
BinaryLabelDataset
(favorable_label=1.0, unfavorable_label=0.0, **kwargs)[source]¶ Base class for all structured datasets with binary labels.
Parameters: 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. -
validate_dataset
()[source]¶ Error checking and type validation.
Raises: ValueError
–labels
must be shape [n, 1].ValueError
–favorable_label
andunfavorable_label
must be the only values present inlabels
.
-