evidentlyai / evidently

Evidently is ​​an open-source ML and LLM observability framework. Evaluate, test, and monitor any AI-powered system or data pipeline. From tabular data to Gen AI. 100+ metrics.
https://www.evidentlyai.com/evidently-oss
Apache License 2.0
5.4k stars 598 forks source link

Allow custom label ordering in plot for categorical data #717

Open AvanBerne opened 1 year ago

AvanBerne commented 1 year ago

Using Evidently 0.4.0 on Databricks runtime 10.4 Looking at outputs for ColumnSummaryMetric and ColumnDriftMetric

When generating results plots for categorical data, the labels on the x-axis are ordered by associated value. I would like to order the results by defined category order.

I have tried assigning category order to the Pandas series that is being evaluated, but that ordering is not carried through to the plot. Would it be possible to include a flag that lets Evidently know to use the Pandas categorical ordering in the output of the plot?

elenasamuylova commented 1 year ago

Thanks for the feature request @AvanBerne!

I am afraid we won't be able to address this in the short term. The reason is that this is a type of parameter can work for all metrics and tests; and library-wide implementation for all checks and output formats will require significant work.

Hopefully we'll be able to address it in the future.