Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Reading results and choosing visualizations

The highest score is the start of interpretation. A useful report should make clear who belongs, how many rows support the pattern, what differs, and how the selected descriptions relate to one another.

A result table with the right context

Loading...

statistics=None gives a target-specific default selection; "all" gives all available statistics. available_statistics(target) lists the valid names. Vector-valued statistics expand into columns such as share 0 or mean ....

The quality column records the score supplied with each result pair. Additional measures are recomputed on these rows and this fitted target. When evaluating descriptions on different data, pass plain rules or label the original quality explicitly; otherwise the original discovery score can appear next to statistics from another dataset.

['size', 'relative_size', 'depth', 'positives', 'target_share', 'target_share_complement', 'lift', 'support', 'recall', 'false_positive_rate', 'leverage', 'odds_ratio', 'conviction']
[petal length (cm) > 4.35 ∧ petal width (cm) > 1.3]
Loading...

The subgroup-complement difference is often larger than the subgroup-dataset difference because the dataset includes the subgroup. State which comparison the quality function uses.

Match the plot to the question

QuestionPlot
How large and enriched is each binary subgroup?plot_subgroup_bars, plot_spineplot
What is the size–quality trade-off?plot_size_quality
How are positives and negatives covered?plot_roc_space
Is the numeric target shifted or spread out?plot_target_distributions
How do descriptors vary within groups?plot_attribute_distribution
Are the results nearly the same rows?plot_overlap, plot_similarity, plot_similarity_dendrogram
Which descriptions specialize others?plot_specialization_graph
How do model relationships differ?plot_model_scatter
Where does classifier ranking deteriorate?plot_performance_curves
How unusual is a validation statistic under its null model?plot_null_distribution

These designs connect to the subgroup visualization and descriptive rule-mining literature Kralj et al., 2005Lavrač et al., 2004Duivesteijn et al., 2016.

Size and quality together

<Figure size 1200x400 with 2 Axes>

In a spineplot, width represents size and the internal split represents the target share. A size–quality scatter shows whether the ranking is dominated by small extreme groups or larger moderate groups. The panels answer related but different questions.

ROC space for subgroup membership

<Figure size 550x550 with 1 Axes>

Here a subgroup description acts as a binary test of the target label: membership means predicted positive. A point gives its false-positive and true-positive rates. Quality contours show which points score equally under WRAcc. This plot is not the ROC curve of a soft classifier within a subgroup; that is plot_performance_curves.

Overlap is part of interpretation

<Figure size 1200x400 with 3 Axes>

Jaccard similarity compares row sets by intersection divided by union. A block of very similar groups suggests that the ranked list repeats one theme. Do not sum subgroup sizes to estimate the number of distinct covered people.

Sum of subgroup sizes: 435
Distinct covered rows: 77

From output to a report

For each selected result, report the description, count, target effect in interpretable units, comparison population, and discovery/validation status. Record the search space, quality measure, constraints, and algorithm so that the process can be reproduced. A chart without these details can conceal a different question than the reader assumes.

All plotting functions accept ax= and theme="light" or "dark", and return a matplotlib Axes. Similarity plots need only results and data; plots of target statistics also take the target. For presentation-quality figures, select a small result set and choose a figure size that keeps descriptions readable.

Experiment. Select the five best scores and then select five low-overlap results from a larger candidate list. Which plot best communicates the change?

References
  1. Kralj, P., Lavrač, N., & Zupan, B. (2005). Subgroup Visualization. SiKDD. https://aile3.ijs.si/dunja/SiKDD2005/Papers/KraljSubgroupVizualizationSiKDD2005.pdf
  2. Lavrač, N., Kavšek, B., Flach, P., & Todorovski, L. (2004). Subgroup Discovery with CN2-SD. Journal of Machine Learning Research, 5, 153–188. https://jmlr.org/papers/v5/lavrac04a.html
  3. Duivesteijn, W., Feelders, A. J., & Knobbe, A. (2016). Exceptional Model Mining: Supervised Descriptive Local Pattern Mining with Complex Target Concepts. Data Mining and Knowledge Discovery, 30, 47–98.