dssg / triage

General Purpose Risk Modeling and Prediction Toolkit for Policy and Social Good Problems
Other
182 stars 61 forks source link

Use string datatype for all bias attributes in dataframe sent to aequitas #875

Closed shaycrk closed 2 years ago

shaycrk commented 2 years ago

Need to take a closer look at whether this is a triage bug or an aequitas bug, but creating an issue here for the time being to make sure we do so. When a numeric field is specified as a bias attribute (even if the field is stored as a varchar in the database), pandas will cast this to a numeric type in the dataframe that gets sent to aequitas, which breaks the crosstabs. Instead, we should specify a string datatype for all the fields being read into the dataframe.