9 distributors | Apr 2026 - Aug 2026 ClickHouse
Machine learning

Model status

Two small models power this POC: an intent classifier for reports and an ARM-ready autoregressive model for weekly demand.

Data store

ClickHouse

Analytics run against ClickHouse. Switch in appsettings.json (DataStore:Provider) and re-ingest with --provider=clickhouse --ch="Host=...;Port=8123;...".

Distributors: 5,12,13,15,16,17,18,20,45. Items: 7124. Parties: 189832. Sales lines: 1698557. Date range: 2026-04-01 to 2026-08-11. [ClickHouse/ubl_poc]

Report intent model

Loaded
TypeML.NET multiclass (SDCA maximum entropy)
Scope13 report intents only
Artifact/opt/ubl-poc/data/models/report-intent.zip
Size44.5 KB
Trained11 Aug 2026 07:17

A 20% split is held back at training time. Accuracy this high reflects a deliberately narrow intent space, not a general-purpose language model.

dotnet run --project src/Ubl.Train

Demand forecast model

5 saved
TypeAutoregressive ridge model (lag-window regression)
TargetWeekly cases per SKU
Horizon4 weeks, recursive
ValidationTrailing holdout MAPE vs a naive carry-forward rule
Artifacts/opt/ubl-poc/data/models

Trained on demand from the Forecast page and cached per SKU. Every run reports the naive baseline alongside it so a SKU that does not benefit is visible rather than hidden.

Supported report intents

IntentWhat it answersExample
SummaryLoaded data counts and rangedatabase summary
MonthlyTrendValue and cases by monthmonthly sales trend
TopSkusSKU ranking by casestop 10 skus last 30 days
TopOutletsOutlet ranking by valuebiggest customers last 30 days
OutletBuyersOutlets buying a brandwho buys kingfisher ultra
GrowingSkusPeriod-over-period gainerswhich skus are growing
DecliningSkusPeriod-over-period loserswhich items slowed down
AtRiskOutletsOutlets that went quietoutlets to win back
StockCoverageWeeks of cover on fast moverswhich skus will stock out
AreaPerformanceTerritory contributionarea wise sales report
BrandShareShare of value by brand familybrand share report
BrandSalesVsPurchaseInward vs outward by monthpurchase vs sales for london
LicenceRosterOutlets by licence and areafl-br licence in palghar

Data behind the models

Store: ClickHouse. Distributors: 5,12,13,15,16,17,18,20,45. Items: 7124. Parties: 189832. Sales lines: 1698557. Date range: 2026-04-01 to 2026-08-11. [ClickHouse/ubl_poc]

An unhandled error has occurred. Reload x

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.