evidently icon indicating copy to clipboard operation
evidently copied to clipboard

Support 'target_names' in Classification Metrics

Open emeli-dral opened this issue 1 year ago • 3 comments

If target_names is specified in the column_mapping it needs to be used in the following metrics:

  • ClassificationQualityByClass()
  • ClassificationClassSeparationPlot()
  • ClassificationProbDistribution()
  • ClassificationQualityByFeatureTable()

Screenshots below illustrate where target_names are supposed to appear on plots:

  1. ClassificationQualityByClass() ClassificationQualityByClass

  2. ClassificationClassSeparationPlot()

ClassificationClassSeparationPlot
  1. ClassificationProbDistribution()
ClassificationProbDistribution
  1. ClassificationQualityByFeatureTable() ClassificationQualityByFeatureTable

emeli-dral avatar Apr 24 '23 10:04 emeli-dral

Hello @emeli-dral , @elenasamuylova , I'm interested in working on this one.

Is there a minimal example to reproduce the screenshots above, available as a starting point? Also, I have a second question, was this bug always present?

aanghelidi avatar Oct 15 '23 19:10 aanghelidi

Hi @aanghelidi, thanks for your interest in contributing!

You can reproduce the bug by taking this example notebook: https://github.com/evidentlyai/evidently/blob/main/examples/how_to_questions/how_to_use_column_mapping.ipynb

It shows how to pass target_names in column mapping for classification tasks (see 5.4 and below) and generate a Report. It does not include all metrics where the bug is present, but you can easily modify it by passing all the Metrics listed in this issue to the Report.

This bug is present since the initial implementation.

elenasamuylova avatar Oct 19 '23 11:10 elenasamuylova

Hi @elenasamuylova, thank you for your detailed answer. As I progress through the PR, I may have other questions, but I'm now ready to work on it.

aanghelidi avatar Oct 21 '23 08:10 aanghelidi