Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification that reweighing algorithm only modifies the instance_weights attribute #159

Merged
merged 2 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aif360/algorithms/preprocessing/reweighing.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def transform(self, dataset):
Args:
dataset (BinaryLabelDataset): Dataset that needs to be transformed.
Returns:
dataset (BinaryLabelDataset): Transformed dataset.
dataset (BinaryLabelDataset): Dataset with transformed
instance_weights attribute.
"""

dataset_transformed = dataset.copy(deepcopy=True)
Expand Down
6 changes: 4 additions & 2 deletions aif360/datasets/structured_dataset.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ class description.
privileged_protected_attributes=privileged_protected_attributes,
metadata=metadata)


def subset(self, indexes):
""" Subset of dataset based on position
Args:
indexes: iterable which contains row indexes
indexes: iterable which contains row indexes

Returns:
`StructuredDataset`: subset of dataset based on indexes
Expand Down Expand Up @@ -363,6 +363,8 @@ def convert_to_dataframe(self, de_dummy_code=False, sep='=',
this dataset contains mappings for label and/or protected
attribute values to strings in the `metadata`, this method will
convert those as well.
sep (char): Separator between the prefix in the dummy indicators and
the dummy-coded categorical levels.
set_category (bool): Set the de-dummy coded features to categorical
type.

Expand Down