You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 76e5a5f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+27-5Lines changed: 27 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The repository is written for product data scientists, product analysts, growth
25
25
26
26
Planned capabilities include synthetic product event generation, clickstream ingestion, validation, funnel analytics, cohort retention, churn prediction, segmentation, recommendation modelling, controlled A/B testing, customer feedback intelligence, GenAI-assisted product insights, Power BI-ready outputs, and Azure-aligned security, governance, monitoring, and deployment patterns.
27
27
28
-
Milestones 1, 2, 3, 4, 5, 6, and 7 implement the repository foundation, deterministic synthetic NexaFlow data generation, local event ingestion with data-quality validation, governed funnel analytics, governed retention/cohort analytics, leakage-aware churn prediction, and governed user segmentation. Later recommendation, experimentation, GenAI, dashboard, and Azure deployment work remains planned.
28
+
Milestones 1, 2, 3, 4, 5, 6, 7, and 8 implement the repository foundation, deterministic synthetic NexaFlow data generation, local event ingestion with data-quality validation, governed funnel analytics, governed retention/cohort analytics, leakage-aware churn prediction, governed user segmentation, and governed recommendation baselines. Later experimentation, GenAI, dashboard, and Azure deployment work remains planned.
29
29
30
30
## Azure Service Mapping
31
31
@@ -35,8 +35,9 @@ Milestones 1, 2, 3, 4, 5, 6, and 7 implement the repository foundation, determin
35
35
| Raw, trusted, and quarantine storage | Azure Data Lake Storage Gen2 | Local raw, interim accepted, and quarantine zones implemented |
36
36
| Stream processing | Azure Stream Analytics or Azure Functions | Local deterministic micro-batch simulation implemented |
Runtime segmentation outputs are written under `outputs/models/segmentation/<segmentation_run_id>/`, which is ignored by Git. Concise reproducible evidence for the committed sample is stored in `docs/evidence/milestone-7/`.
107
108
109
+
## Governed Recommendation Baseline
110
+
111
+
Milestone 8 adds deterministic recommendation baselines over trusted Milestone 3 accepted outputs. The workflow creates a governed product-action catalogue, maps clickstream events into implicit-feedback strengths, builds point-in-time user-item interactions, applies plan/persona/company-size eligibility, generates candidates, compares popularity, recent-popularity, segment-aware popularity, and item-item collaborative-filtering baselines, and reports offline ranking, coverage, novelty, diversity, segment, and cold-start metrics.
112
+
113
+
Runtime recommendation outputs are written under `outputs/models/recommendations/<recommendation_run_id>/`, which is ignored by Git. Concise reproducible evidence for the committed sample is stored in `docs/evidence/milestone-8/`. The workflow is an offline synthetic-data baseline only; it is not an online recommender, causal treatment policy, or experiment readout.
114
+
108
115
## Analytics, ML, and GenAI Use Cases
109
116
110
-
Analytics use cases include active user tracking, journey funnels, feature adoption, retention, churn, resurrection, customer lifetime value, and governed user segmentation. ML use cases now include local churn prediction and segmentation demonstrations; recommendation baselines and experiment uplift interpretation remain planned. GenAI use cases will focus on grounded summarisation, feedback theme extraction, insight narratives, and human-reviewed product action recommendations.
117
+
Analytics use cases include active user tracking, journey funnels, feature adoption, retention, churn, resurrection, customer lifetime value, and governed user segmentation. ML use cases now include local churn prediction, segmentation, and recommendation baseline demonstrations; experiment uplift interpretation remains planned. GenAI use cases will focus on grounded summarisation, feedback theme extraction, insight narratives, and human-reviewed product action recommendations.
111
118
112
119
## Repository Structure
113
120
@@ -151,7 +158,7 @@ Analytics use cases include active user tracking, journey funnels, feature adopt
The implementation favours typed Python, deterministic behaviour, small interfaces, no embedded secrets, no generated data in Git, clear metric ownership, local validation by default, and Azure-specific adapters only where they are useful. Future Azure deployments should use managed identity, RBAC, Key Vault, private networking where appropriate, and monitoring that avoids leaking customer data.
@@ -278,7 +299,8 @@ The implementation favours typed Python, deterministic behaviour, small interfac
| Churn feature preparation | Local point-in-time churn feature builder | Azure Synapse Analytics or Azure ML data preparation |
16
+
| Recommendation interaction preparation | Local point-in-time interaction and candidate builder | Azure Synapse Analytics or Azure ML data preparation |
16
17
| Scheduled analytics | Makefile/CI commands | Azure Data Factory or Synapse pipelines |
17
18
| Model training | Local deterministic churn training scripts | Azure Machine Learning |
18
19
| Model tracking | Local reports, manifests, lineage, and metadata | Azure ML jobs, MLflow, and Azure ML registry |
19
20
| User segmentation | Local rule-based and KMeans segmentation | Azure Machine Learning |
21
+
| Recommendation baselines | Local popularity, segment-aware, and item-item CF baselines | Azure Machine Learning |
20
22
| Batch scoring | Local prediction CSV outputs | Azure ML batch endpoints |
21
23
| Batch segment assignment | Local assignment CSV outputs | Azure ML batch endpoints |
24
+
| Batch recommendation generation | Local recommendation CSV and reason JSONL outputs | Azure ML batch endpoints or Synapse scheduled jobs |
22
25
| Online scoring | Future scope only | Azure ML managed online endpoints |
23
26
| GenAI insights | Mocked or disabled by default | Azure AI Foundry and Azure OpenAI |
24
27
| Dashboards | Local documented outputs | Power BI |
@@ -36,4 +39,4 @@ The platform is local-first, but each major component is designed to map cleanly
36
39
- Infrastructure templates are planned, not active, in Milestone 6.
37
40
- No Azure service is deployed by the current repository.
38
41
39
-
The churnand segmentation workflows map trusted accepted data to ADLS Gen2 trusted zones, feature preparation to Synapse or Azure ML data preparation, experiment tracking to Azure ML jobs and MLflow, model registry to Azure ML registry, monitoring to Azure Monitor and Azure ML monitoring, secrets to Key Vault, identity to managed identity and Azure RBAC, governance and lineage to Microsoft Purview, and dashboard consumption to Power BI. The local implementation does not install Azure SDKs, create clients, deploy resources, or claim an Azure ML endpoint exists.
42
+
The churn, segmentation, and recommendation workflows map trusted accepted data to ADLS Gen2 trusted zones, feature and interaction preparation to Synapse or Azure ML data preparation, experiment tracking to Azure ML jobs and MLflow, model registry to Azure ML registry, monitoring to Azure Monitor and Azure ML monitoring, secrets to Key Vault, identity to managed identity and Azure RBAC, governance and lineage to Microsoft Purview, and dashboard consumption to Power BI. The local implementation does not install Azure SDKs, create clients, deploy resources, or claim an Azure ML endpoint exists.
Copy file name to clipboardExpand all lines: docs/architecture/data-flow.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Data Flow
2
2
3
-
This document describes the logical data flow. Milestone 3 implements the local raw-to-interim ingestion and validation portion. Milestone 4 implements governed funnel analytics over trusted interim data. Milestone 5 implements governed retention and cohort analytics. Milestone 6 implements local leakage-aware churn prediction. Milestone 7 implements governed user segmentation. GenAI, dashboarding, and Azure deployment remain planned.
3
+
This document describes the logical data flow. Milestone 3 implements the local raw-to-interim ingestion and validation portion. Milestone 4 implements governed funnel analytics over trusted interim data. Milestone 5 implements governed retention and cohort analytics. Milestone 6 implements local leakage-aware churn prediction. Milestone 7 implements governed user segmentation. Milestone 8 implements governed recommendation baselines. Experiment analysis, GenAI, dashboarding, and Azure deployment remain planned.
@@ -96,3 +96,21 @@ Churn model selection uses validation metrics only. The default rule ranks by va
96
96
|`SEGMENT_PROFILE_SHARE`| Segment population share | Segment users divided by eligible users | Null when no eligible users exist |
97
97
98
98
Segmentation candidates are selected by rejecting clusters below the minimum-size rule, prioritising silhouette score, using stability as a tie-breaker, and preferring fewer clusters where quality is materially similar. Segment profiles are descriptive and suppression-aware.
99
+
100
+
## Recommendation Ranking Metrics
101
+
102
+
| Metric ID | Business meaning | Definition | Null handling |
103
+
| --- | --- | --- | --- |
104
+
|`REC_PRECISION_AT_K`| Share of top-K recommendations that appear in future holdout interactions | Relevant recommended items in top K divided by recommended items in top K | Zero when no evaluated recommendations exist |
105
+
|`REC_RECALL_AT_K`| Share of future relevant items captured in top K | Relevant recommended items in top K divided by relevant holdout items | Zero when no relevant holdout items exist |
106
+
|`REC_HIT_RATE_AT_K`| Share of evaluated users with at least one relevant top-K recommendation | Users with a hit in top K divided by evaluated users | Zero when no evaluated users exist |
107
+
|`REC_MRR`| Ranking position of first relevant recommendation | Mean reciprocal rank of first hit per evaluated user | Zero when no first hit exists |
108
+
|`REC_MAP_AT_K`| Average precision across the ranked top-K list | Mean average precision at K over evaluated users | Zero when no evaluated users exist |
109
+
|`REC_NDCG_AT_K`| Position-aware ranking quality | Normalised discounted cumulative gain at K against binary holdout relevance | Zero when ideal DCG is zero |
110
+
|`REC_CATALOGUE_COVERAGE_AT_K`| Breadth of catalogue exposure | Distinct items recommended in top K divided by active catalogue items | Zero when catalogue is empty |
111
+
|`REC_USER_COVERAGE`| Share of eligible users receiving recommendations | Users with recommendation rows divided by eligible users with model output | Zero when no eligible users exist |
112
+
|`REC_NOVELTY_AT_K`| Preference for less historically common items | Mean negative log historical item share with smoothing | Zero when no recommendation rows exist |
113
+
|`REC_DIVERSITY_AT_K`| Variety of item categories within recommendation lists | Mean distinct item categories divided by recommended items | Zero when no recommendation rows exist |
114
+
|`REC_FALLBACK_RATE`| Share of recommendations produced by fallback logic | Fallback recommendation rows divided by recommendation rows | Zero when no recommendation rows exist |
115
+
116
+
Recommendation metrics are descriptive offline metrics over synthetic data. The future holdout window is used only for evaluation and never for candidate generation or scoring. Model selection rejects models below coverage guardrails, prioritises NDCG@5, uses recall@5 as a tie-breaker, and prefers simpler baselines where quality is materially similar.
0 commit comments