-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal_capture.txt
More file actions
82 lines (79 loc) · 9.66 KB
/
Copy pathterminal_capture.txt
File metadata and controls
82 lines (79 loc) · 9.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
$ kpi-radar explain on_time_delivery_rate 2025-02-10
───────────────────────────────────────── on_time_delivery_rate 2025-02-10 ──────────────────────────────────────────
on_time_delivery_rate on 2025-02-10 came in at 90.17% against a seasonal baseline of 94.26%, 4.09% below expectation
(4.3% relative, robust z -4.4). The movement concentrates on region: EMEA -3.92 (95.8% of the move); NA_EAST -0.24
(5.9% of the move); APAC +0.10 (-2.5% of the move). The minimal explaining set is EMEA (1 of 5 slices, 95.8% of the
movement). Split on that dimension the movement is 99.8% rate, 0.0% mix and 0.2% interaction. Raised: the movement
survives conditioning on every dimension, so it is a genuine rate change rather than a composition artefact.
Dimension ranking
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ dimension ┃ concentration ┃ rate share ┃ mix share ┃ minimal set ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ region │ 0.71 │ 99.8% │ 0.0% │ EMEA │
│ channel │ 0.23 │ 99.8% │ -0.3% │ WEB, MOBILE │
│ customer segment │ 0.06 │ 100.0% │ -0.0% │ MID_MARKET, SMB, ENTERPRISE │
│ product category │ 0.04 │ 100.0% │ 0.0% │ APPAREL, ACCESSORIES, ELECTRONICS, OUTDOORS, WELLNESS │
│ warehouse │ 0.03 │ 99.9% │ 0.1% │ WH_FRA, WH_SIN, WH_ATL, WH_RNO │
└──────────────────┴───────────────┴────────────┴───────────┴───────────────────────────────────────────────────────┘
Contributions by region
┏━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━┓
┃ slice ┃ actual ┃ baseline ┃ contribution ┃ rate ┃ mix ┃ interaction ┃ share ┃
┡━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━┩
│ EMEA │ 74.44 │ 93.91 │ -3.92 │ -3.91 │ -0.00 │ -0.01 │ 95.8% │
│ NA_EAST │ 94.52 │ 95.33 │ -0.24 │ -0.24 │ +0.00 │ -0.00 │ 5.9% │
│ APAC │ 93.60 │ 92.97 │ +0.10 │ +0.10 │ -0.00 │ +0.00 │ -2.5% │
│ LATAM │ 93.71 │ 93.89 │ -0.02 │ -0.02 │ -0.00 │ -0.00 │ 0.4% │
│ NA_WEST │ 94.17 │ 94.23 │ -0.01 │ -0.01 │ +0.00 │ +0.00 │ 0.3% │
└─────────┴────────┴──────────┴──────────────┴───────┴───────┴─────────────┴───────┘
verdict: OPEN
$ kpi-radar explain revenue_per_order 2024-06-12
─────────────────────────────────────────── revenue_per_order 2024-06-12 ────────────────────────────────────────────
revenue_per_order on 2024-06-12 came in at 90.95 against a seasonal baseline of 150.49, 59.54 below expectation (39.6%
relative, robust z -79.6). The movement concentrates on customer segment: SMB -38.33 (64.4% of the move); ENTERPRISE
-27.39 (46.0% of the move); MID_MARKET +6.18 (-10.4% of the move). The minimal explaining set is SMB, ENTERPRISE (2 of
3 slices, 110.4% of the movement). Split on that dimension the movement is -1.9% rate, 101.1% mix and 0.8%
interaction. Not raised: on customer segment the movement is 101.1% composition and only 1.9% rate, so every slice is
performing normally and only the weighting changed. This is a mix shift, not a regression.
Dimension ranking
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ dimension ┃ concentration ┃ rate share ┃ mix share ┃ minimal set ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ customer segment │ 0.20 │ -1.9% │ 101.1% │ SMB, ENTERPRISE │
│ product category │ 0.17 │ 100.0% │ 0.1% │ ELECTRONICS, HOME, APPAREL, OUTDOORS │
│ channel │ 0.16 │ 100.0% │ 0.0% │ WEB, MOBILE, RETAIL │
│ region │ 0.10 │ 100.0% │ 0.0% │ NA_EAST, NA_WEST, EMEA, APAC │
│ warehouse │ 0.07 │ 100.0% │ -0.0% │ WH_ATL, WH_RNO, WH_FRA │
└──────────────────┴───────────────┴────────────┴───────────┴──────────────────────────────────────┘
Contributions by customer segment
┏━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┓
┃ slice ┃ actual ┃ baseline ┃ contribution ┃ rate ┃ mix ┃ interaction ┃ share ┃
┡━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━┩
│ SMB │ 43.92 │ 43.60 │ -38.33 │ +0.10 │ -38.54 │ +0.12 │ 64.4% │
│ ENTERPRISE │ 304.19 │ 301.80 │ -27.39 │ +0.72 │ -27.67 │ -0.44 │ 46.0% │
│ MID_MARKET │ 117.45 │ 116.66 │ +6.18 │ +0.31 │ +6.01 │ -0.14 │ -10.4% │
└────────────┴────────┴──────────┴──────────────┴───────┴────────┴─────────────┴────────┘
verdict: SUPPRESSED_MIX_SHIFT
$ pytest --cov=src/kpi_radar --cov-report=term
.............................................................................................................. [ 85%]
.................. [100%]
=================================================== tests coverage ===================================================
__________________________________ coverage: platform linux, python 3.11.15-final-0 __________________________________
Name Stmts Miss Cover
----------------------------------------------------
src/kpi_radar/__init__.py 2 0 100%
src/kpi_radar/attribution.py 135 0 100%
src/kpi_radar/baseline.py 129 0 100%
src/kpi_radar/cli.py 183 2 99%
src/kpi_radar/config.py 111 0 100%
src/kpi_radar/detect.py 233 7 97%
src/kpi_radar/evaluate.py 145 3 98%
src/kpi_radar/explain.py 37 1 97%
src/kpi_radar/kpis.py 60 3 95%
src/kpi_radar/logging_setup.py 70 0 100%
src/kpi_radar/orchestration.py 125 0 100%
src/kpi_radar/report.py 112 1 99%
src/kpi_radar/seed.py 164 0 100%
src/kpi_radar/warehouse.py 58 0 100%
----------------------------------------------------
TOTAL 1564 17 99%
128 passed in 12.89s