Wise Pizza: Discovering Insights in Multidimensional Data

Wise Pizza is a Python library designed to find and visualize the most interesting slices in multidimensional data. As described in its official documentation, the library provides various functions to identify segments whose average values significantly differ from the global average or to find segments that best explain the differences between two datasets.

Wise Pizza is a Python library designed to find and visualize the most interesting slices in multidimensional data. As described in its official documentation, the library provides various functions to identify segments whose average values significantly differ from the global average or to find segments that best explain the differences between two datasets.

The Underlying Approach

According to the official repository, Wise Pizza works with datasets containing discrete dimensions (such as currency, region, etc.). For each dimension combination, the dataset must include:

  • A total value (the metric total for that segment)

  • An optional size value (defaulting to 1 if not specified)

The average value for any segment is calculated as total divided by size. For example, this could represent the average transaction volume per customer in a specific region and currency.

Key Functions and Capabilities

Wise Pizza offers three main analytical functions:

1. Finding Segments with Unusual Averages

The explain_levels function identifies a small number of "simple" segments that explain most of the variation in averages across your dataset. These segments represent the areas where size-weighted deviation from the overall dataset average is largest.

2. Analyzing Changes Between Datasets (Totals)

explain_changes_in_totals compares two datasets to find segments contributing most significantly to differences in totals