Skip to content

Mix / Share

YAML type: mix | Category: Business

Flags anomalies in a child series' share of its parent aggregate.

Description

For each point, share = child_value / parent_total. Parent totals are precomputed at daily/weekly/monthly granularity. Grain: parentBy + childVaryBy filled; other categories null.

How it works

Mix / Share illustration

Mix evaluates the child's share of its parent: share = child_value / parent_total. Parent totals are precomputed at daily, weekly, or monthly granularity; the share is then scored with pct_point, relative, or robust_z against its baseline.

The series must sit on the parent/child grain (parentBy and childVaryBy filled, other categories null). minParentValue skips tiny parents where share ratios are unstable.

Setup

Set parent/child category lists, granularity, and method (pct_point, relative, robust_z).

Configure detectors on the data view Analysis tab or in YAML. Validate with Data Preview before enabling production schedules.

Settings

Parameter Default Description
parentBy -- Parent aggregate categories
childVaryBy -- Child identity within parent
granularity daily Period grain -- see Allowed values
method pct_point Share scoring -- see Allowed values
threshold 2.0 Method-specific threshold
mode both Direction -- see Allowed values
minParentValue 1.0 Skip tiny parents

Allowed values

granularity

Value Meaning
daily Evaluate at day grain (default; also the fallback for unknown values)
weekly Evaluate at week grain (alias: week)
monthly Evaluate at month grain (alias: month)

method

How share deviations are scored (share = child / parent).

Value Meaning
pct_point (default in catalog samples) Deviation from median share in percentage points; threshold is in pp
relative Percent change vs median share; threshold is a percent
robust_z Robust z-score vs share baseline; threshold is a z-score

mode

Value Meaning
above Flag increases / values above the comparison (or high side of a band)
below Flag decreases / values below the comparison (or low side of a band)
both Flag either direction

Shared series filters

Most detectors also accept optional series filters in params:

Parameter Purpose
maxGapAmount Skip series when gap amount is too high (null = no limit). Catalog create-default is often 5.
minValue Skip series whose average value is below this (null = no limit). Catalog create-default is often 1000.
maxValue Skip series whose average value is above this (optional; omit/null = no limit)
useSpecialDates When true, suppress anomalies that overlap special dates

When a filter skips a series, Data Preview shows the reason.

Configuration example

analysis:
  detectors:
    - type: mix
      params:
        parentBy: [region]
        childVaryBy: [product]
        granularity: daily
        method: pct_point
        threshold: 5.0
        mode: both
        minParentValue: 10.0

Using the detector

Use when absolute values look fine but share of the mix shifts.

Use cases

  • Product mix within a region
  • Channel share of total sales
  • Portfolio allocation drift