Model bias across groups
Not met yet
A model can be accurate overall and much worse for one group: usually a group it saw little of, or one whose pattern differs from everyone else's. One overall score hides it, because the bigger group's results swamp the smaller one's. So score each group on its own, with a mask like groups == "village", and look hardest at the mistake that costs people something, counted among those it could happen to: of the visitors who came, how many would have lost their slot? Leaving the group out of the columns doesn't prevent bias. A model only knows its columns; what it was never shown, it can't allow for.
Try it
main.pyOutput
Press Run and what your program prints shows up here.
Easy to get wrong
- Thinks a model with good overall accuracy must do about as well for every group.
- Thinks a model can't treat a group unfairly unless the group is one of its columns.
- Thinks a costly mistake's rate should be counted over everyone in the group, rather than over the people it could happen to.
- Thinks adding more rows of any kind fixes a model's bias, rather than more rows like the group it does badly for.