pega-datascientist-tools
pega-datascientist-tools copied to clipboard
Subsetting top-n for each facet in plotPredictorPerformance
With the current version of Python CDH tools, there is a top-n argument which filters out the n top performing predictors. This works fine, but when you add facets to the plot it keeps those same top-n predictors over each plot.
This has some advantages, like it always using the same axes and overall being quite consistent, but it could also be interesting to instead look at the top predictors for each facet separately.
After some thinking, the current behaviour is desired as it provides the most consistent plot when comparing between facets. If instead it would be desirable to have the top predictors per channel, the recommendation is to plot each plot separately with the query argument filtering out each channel. If it is really necessary to have it all in one plot, it may be possible to create a custom subplot from plotly graph objects, but for now this won't be supported OOTB.