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_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. -
validate_dataset()[source]¶ Error checking and type validation.
Raises: ValueError–labelsmust be shape [n, 1].ValueError–favorable_labelandunfavorable_labelmust be the only values present inlabels.
-