Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Customer Base Forecast: An Ensemble with a Neural Network Cut Error from 2.17% to 1.8%

Businesses need to know how many unique customers will place at least one order in a month. This is the MAU, the monthly active user base. The Prophet forecast was off by 2.17% on average at month's end, while a simple formula, last year's curve multiplied by a growth coefficient, was off by 2.08%. An ensemble of the TSMixer neural network and this formula cut the error to 1.8%, but required modeling 79 cities separately. So with such a modest gain in accuracy, it is better to change the problem setup rather than the model.

AI-processed from Habr AI; edited by Hamidun News
Customer Base Forecast: An Ensemble with a Neural Network Cut Error from 2.17% to 1.8%
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Tuning about 50 Prophet configurations gained only 0.1 pp, which amounts to fitting to noise
TSMixer across 79 cities2.0% error on 90,000 observations
Key metric #3Customers who buy in two cities are counted only in their home city to avoid duplicates

"Everything already works, we just need to improve it a little" is the kind of statement that usually precedes surprises. That is where the task began, the one the author covers on Habr: forecasting the monthly active customer base, abbreviated MAU. This is the number of unique buyers who placed at least one order since the start of the calendar month.

The director cared less about hitting an intermediate point on the chart than about answering a practical question: "If today is the 10th, how many customers will we have by the end of the month?" This is the second part of a series on the P.E.

S.E.Ts system, which forecasts revenue, orders, and units sold.

The usual recipe of "take a neural network and build an ensemble" delivered a gain here, but a modest one.

Why people are harder to count than money

Orders and revenue can be added up day by day: 100,000 orders today and 120,000 tomorrow give 220,000. People don't add up that way. If 40,000 of tomorrow's buyers already ordered yesterday, the base grows by only 80,000, so over two days there are 180,000 people. Within a month, such a base only grows, and on the first day the counter resets to zero. The chart ends up looking like a sawtooth.

For forecasting, this creates three problems. The series restarts every month, and months last from 28 to 31 days. Growth slows down: the more regular customers have already ordered, the slower the base grows. Finally, one curve mixes newcomers, returning customers, promotions, and the calendar.

Quality was measured by end-of-month error, EOM MAPE. This is the average percentage deviation between the forecast of the final base and the actual figure, averaged over all days of the calculation. For each day, the model saw only the facts up to yesterday and predicted growth for the remaining days.

The path there: from Prophet to a neural network

The old solution used Prophet to forecast not the monthly sawtooth but a rolling base over the last 30 days. A chain of adjustments for month length and the historical profile then turned it into the calendar-month total. The old backtest had two flaws: it tested only Prophet itself, and it let the model peek at the actual future values of inflation, the key rate, and discounts. The author removed the leak: macroeconomic variables were carried forward at their last known values, and discounts were taken from commercial plans. The honest error came to 2.17%, and in some periods it ran at 5–7% for several days in a row.

Regular hyperparameter search didn't help either. Each run tried about 50 Prophet configurations, but compared with a single fixed one the gain was only 0.1 pp. In effect, the model was being fitted to the noise of the last few weeks.

Next, the author took the simplest approach: the trajectory of the same month last year, multiplied by a growth coefficient. If there were 15% more customers last month than a year earlier, the curve is multiplied by 1.15. The full previous month proved to be the best window for the coefficient. The error was 2.08%, which beat the complex Prophet chain.

For a neural network at the country level, there is too little data: three years of history gives about 1,100 points. So the forecast was broken down to 79 cities, roughly 90,000 observations. This raised the problem of "double-counted" people: a customer who orders from home in Moscow and, while traveling, from St. Petersburg, appears in the base of two cities even though there is only one of them in the country. Each buyer was counted only in their home city, defined as the city with the most orders over the last three months. The double-counting effect was under 1%, but the author wanted to remove it properly.

The TSMixer neural network was chosen because boosting methods such as CatBoost are poorly suited to forecasting an entire curve 45 days ahead. Results by EOM error:

  • Prophet on rolling MAU: 2.17%
  • annual seasonality: 2.08%
  • TSMixer by city: 2.0%
  • TSMixer combined with seasonality: 1.8%

The cost of the gain and the way back

The ensemble is more accurate than each model on its own, but seasonality alone was enough with last year's curve and one coefficient. TSMixer requires city-level detail, distribution of people across home cities, a complex feature set, and maintenance of two model pipelines. For a small gain over a basic formula, that is expensive. All approaches, from Prophet to the neural network, were trying to guess the shape of the same final curve, so the author decided to change not the model but the problem setup.

He split MAU into two non-overlapping flows. Inflow is the first orders from newcomers and from customers who returned after a break of more than 365 days. Returns are the first orders of the month from those who bought within the last year. The end-of-month forecast equals the accumulated actual value plus future inflow plus future first returns. Returns are estimated from a snapshot of the base at the start of the month: users are grouped by city, segment, time since last order, and number of orders over the last 60 days.

What to take away

If an ensemble of a neural network and a simple formula gives a modest gain at a multiple increase in complexity, it is worth reconsidering the problem setup. Check the entire calculation chain, not just one model. Make sure no future information leaks into the test. Establish a simple baseline formula against which you honestly compare everything else. Limitations: the figures come from an internal backtest of a single service, and the available part of the material does not report the final accuracy of the approach with its components.

Story

Key Questions Answered

Why people are harder to count than money?

Orders and revenue can be added up day by day: 100,000 orders today and 120,000 tomorrow give 220,000. People don't add up that way. If 40,000 of tomorrow's buyers already ordered yesterday, the base grows by only 80,000, so over two days there are 180,000 people. Within a month, such a base only grows, and on the first day the counter resets to zero. The chart ends up looking like a sawtooth. For forecasting, this creates three problems. The series restarts every month, and months last from 28 to 31 days.

What are the key details on The path there: from Prophet to a neural network?

The old solution used Prophet to forecast not the monthly sawtooth but a rolling base over the last 30 days. A chain of adjustments for month length and the historical profile then turned it into the calendar-month total. The old backtest had two flaws: it tested only Prophet itself, and it let the model peek at the actual future values of inflation, the key rate, and discounts.

What are the key details on The cost of the gain and the way back?

The ensemble is more accurate than each model on its own, but seasonality alone was enough with last year's curve and one coefficient. TSMixer requires city-level detail, distribution of people across home cities, a complex feature set, and maintenance of two model pipelines. For a small gain over a basic formula, that is expensive. All approaches, from Prophet to the neural network, were trying to guess the shape of the same final curve, so the author decided to change not the model but the problem setup.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Customer Base Forecast: An Ensemble with a Neural Network Cut Error from 2.17% to 1.8% https://news.hamidun.com/en/news/18644/customer-base-forecast-an-ensemble-with-a-neural-network-cut

What do you think?
Loading comments…