-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support for multi-class classification #431
Comments
Also, computing the basic metrics FPR, TPR, FNR, TNR etc... results in error as the labels are calculated implicitly based on the y_true (actual labels). This should be asked explicitly from the user, as it is possible for a subset to leave out some class label which results in sci-kit learn's error.
|
Hi @Mahima-ai - thanks for raising an issue. These models should definitely get fixed if they're not right! Sorry if this has caused you problems, we just haven't got any datasets in EthicML where we do multi-class classification so we haven't really thought about it very much. That said, it is something I want us to do right - FairML work in general is far too focussed on binary classification problems. Do you have a dataset that we should add? (I understand that this is a long shot - datasets are not so open) You a good point about the confusion matrix based metrics. One option is for the user to specify the label values, but as this is a property of the dataset, it would be nice if this information could be taken from there directly. If you'd like to open a PR, you're more than welcome. Alternatively I will try to address this. Looking through the tests, we don't have enough that use the Sorry again for causing you problems, and thanks by the way, for using EthicML |
Hi @olliethomas, I looked into this further and found that the
I am attaching a notebook (in the zip folder) on iris dataset to reproduce the same scenario for your perusal. |
Thanks for the notebook - I've tweaked it slightly and moved it to colab. It's available here The error that you are seeing was due to the possible target values being inferred from the dataset. There are actually two solutions to this. The first, I've added in #489 - which is the option to define the labels for a metric. so The second solution is probably closer to what most users want to do. The problem is the
What is happening here is that the protected attribute, In the case of the notebook - if you set the sensitive attribute to some binary value, then everything works without having to define the labels.
Hopefully this solve the issue for now - we'll make a new release soon. If I've misunderstood, or this doesn't solve the problem, please let me know. Thanks again. |
Hi,
I have been working on a multi-class classification problem. I used the following metrics with the pos_class parameter for all the classes one by one but the values are same for all the classes.
On further investigation, I figured out that the Theil index is calculated for the class having maximum instances while other metrics are calculated for Y=1.
Please let me know whether the above mentioned metrics support multi-class classification or not. If yes, then how can I use it and if not, are you planning to have it in the next release.
The text was updated successfully, but these errors were encountered: