dssg / aequitas

Bias Auditing & Fair ML Toolkit
http://www.datasciencepublicpolicy.org/aequitas/
MIT License
656 stars 110 forks source link

ValueError: Replace has to be set to True when upsampling the population frac > 1 #165

Closed valmik-patel closed 4 months ago

valmik-patel commented 4 months ago

This error occurs when creating a GenericDataset with splits

File: aequitas/src/aequitas/flow/datasets/generic.py Line: 183

This happens because the value of adjusted_frac can become greater than 1 for the last split due to rounding issues. A potential solution would be to cap the value of adjusted_frac to 1

Example: Creating a GenericDataset with 11 examples and two splits (0.7 and 0.3) will throw this error

This error happened on a Google Colab notebook running the repository

valmik-patel commented 4 months ago

This issue has been fixed by https://github.com/dssg/aequitas/pull/168

Closing the issue now