Hotel revenue managers often rely on intuition, leading to revenue losses of up to 15%. We replace intuition with a data-driven forecast built on LightGBM and custom features. An error in occupancy prediction results in an overcrowded restaurant or idle staff—we solve this through granular analysis of OTB, pickup, and cancellations. Our team has 10+ years of experience in AI/ML and 30+ implemented projects in hospitality. We guarantee MAPE <5% at a 14-day horizon after model stabilization.
System Architecture for Hotel Occupancy Forecasting
On-the-books (OTB) Base — AI System Development
The current booking portfolio is the starting point. On a date 30 days out, OTB predicts final occupancy with 70–80% accuracy based solely on existing bookings.
Pickup Forecast
How many more bookings will come in from now until arrival. The pickup pattern is specific to each hotel and segment. We use historical pickup curves weighted by segment.
def pickup_forecast(arrival_date, current_reservations, pickup_curves):
"""
For each segment: historical pickup by day to arrival
Example: business segment books on average 7 days ahead, leisure 30
"""
days_until_arrival = (arrival_date - today).days
expected_pickup = {}
for segment, curve in pickup_curves.items():
expected_pickup[segment] = curve.predict(days_until_arrival, current_reservations[segment])
return sum(expected_pickup.values())
Cancellation Correction
Not all bookings materialize. Cancellations depend on lead time, rate type (non-refundable — 0%), and channel (OTA vs direct). No-show adds another 2–5%. The model predicts cancellation rate by segment using historical data and lead time. According to a study by Hospitality Technology, accurate cancellation forecasting reduces losses by up to 10%. We add the feature cancellation_exposure—the share of bookings with a high cancel rate—improving accuracy by 5–7%.
| Segment |
Lead time 30+ days |
Lead time 7-14 days |
| OTA |
30–40% |
10–15% |
| Direct |
15–20% |
5–8% |
| Corporate |
5–10% |
2–3% |
Feature Engineering
Feature engineering example
```python
occupancy_features = {
'rooms_on_books': current_reservations,
'otb_vs_last_year_same_date': otb / last_year_otb,
'pace_index': otb_growth_rate,
'cancellation_exposure': high_cancel_rate_bookings,
'occupancy_same_date_last_year': historical_occupancy,
'occupancy_avg_dow_last_4w': avg_occupancy_day_of_week,
'convention_center_events': events_score,
'sports_events': sports_score,
'concerts': concert_score,
'graduation_season': graduation_flag,
'month': month,
'week_number': week_of_year,
'is_holiday': holiday_flag,
'school_holidays': school_holiday,
'competitor_sold_out': compset_availability_index,
'market_demand_index': str_market_demand
}
```
These features allow the model to account for both internal trends (OTB, pickup) and external factors (events, market). The importance of each feature is evaluated via SHAP values, yielding an interpretable forecast.
Models by Horizon
| Horizon |
Features |
MAPE |
Model |
| 1–14 days |
OTB + pickup + cancellation |
<5% |
LightGBM |
| 14–60 days |
OTB + events + seasonality |
8–12% |
XGBoost + event embed |
| 60–365 days |
Seasonal decomp + macro |
15–25% |
Prophet + trend |
LightGBM on short-term achieves the best accuracy due to its ability to capture nonlinear interactions between OTB features. Compared to ARIMA, LightGBM reduces MAPE by half at a 14-day horizon. For medium-term forecasts, we use XGBoost with event embedding; for long-term, Prophet with seasonal decomposition.
How PMS Integration Improves Forecast Accuracy?
Automatic import of bookings from PMS every 4 hours allows real-time forecast recalculation. When a group booking occurs, the system triggers a pickup forecast recalculation. The revenue management dashboard updates automatically, providing an operational occupancy picture. This reduces forecast error by 10–15% compared to manual updates once per day.
We also integrate STR (Smith Travel Research) data for competitor set comparison. The Market Penetration Index (MPI) allows adjusting the forecast for market share.
Accuracy metrics: D-1 forecast MAPE < 5%, D-7 forecast MAPE < 8%, D-30 forecast MAPE < 12%.
Segmented Hotel Forecast
Overall occupancy is not enough. We need a breakdown by guest segment and room type.
Guest Segments
- Transient leisure (FIT): highest price, price-sensitive
- Corporate: fixed rates, predictable pattern
- Groups & Meetings: booked well in advance, high volume
- OTA vs. Direct: different commission and client type
Room Type
- Standard / Deluxe / Suite: different price, different demand elasticity
- Single vs. Double: occupancy patterns differ
A segmented forecast enables dynamic pricing for each segment, increasing RevPAR by 5–8%. The additional revenue averages 1–2 million rubles per month for a 200-room hotel.
Operational Planning
Staffing
Housekeeping: occupied_rooms × checkout_stayover_mix × min_per_room / 60
F&B: expected_guests × meal_plan_pct × meals_per_time_slot
Front Desk: check-ins_per_hour / optimal_agent_load
Accurate occupancy forecasts optimize staffing and procurement costs. For example, at 80% occupancy, housekeeping needs 12 people; at 50% — 8. Staffing savings can reach 200,000 to 500,000 rubles per month.
Procurement
Breakfast forecast → product purchase 2–3 days ahead. Amenities ordered weekly based on forecast.
Maintenance Scheduling
Predicted low occupancy → schedule technical room work without revenue loss.
Why Segmented Forecast Generates More Profit?
Segmented forecast enables dynamic pricing for each segment. For instance, if the leisure segment shows high pickup, we can raise prices on standard rooms. The leisure segment often books closer to the date and is willing to pay more when occupancy is high. The segmented approach allows raising prices on standard rooms without affecting corporate blocks. Our experience shows RevPAR growth of 5–8% after implementing a segmented forecast. Order the development of an hotel occupancy forecasting system to achieve similar results.
How We Build the Model: Step-by-Step Process
- Analyze PMS data and identify biases.
- Feature engineering: OTB, pickup, events, competition.
- Train LightGBM with time-based cross-validation.
- A/B test with current forecast on historical data.
- Deploy model on Kubernetes via MLflow.
- Monitor accuracy and automatically retrain on data drift.
- Continuous monitoring and weekly retraining.
Scope of Work and Timelines
Included:
- PMS data analysis and bias identification
- Feature engineering: OTB, pickup, events, competition
- LightGBM/XGBoost training and validation
- Revenue management dashboard
- Model and ETL documentation
- Staff training
- 3 months post-deployment support
Basic occupancy forecast with LightGBM and OTB features — 4–5 weeks. Segmented system with event calendar and operational planning — 3–4 months. Cost is calculated individually after data audit. Contact us for a preliminary assessment. Get a consultation on a pilot project.
When does a time series forecasting model fail in production?
The CFO requests a quarterly sales forecast. An analyst builds SARIMA on three years of data, achieves MAPE 8.3% on the test set, and deploys. Two months later, the metric in production jumps to 23%. The root cause: the model was trained on pre‑COVID data, tested on a stable period, but production hit a promotion and supply chain disruption. Data leakage plus distribution shift—perfect notebook numbers, a broken forecast in reality. We have seen this pattern dozens of times across retail, fintech, and IoT. Our team has delivered more than 50 forecasting projects over 5+ years.
Incorrect cross-validation. Standard train_test_split for time series creates data leakage: the model sees future values during training. The correct approach is TimeSeriesSplit or walk‑forward validation with an expanding window.
Multiple seasonality. Hourly electricity consumption has three seasonalities: daily (24h), weekly (168h), yearly (8760h). SARIMA handles only one. Prophet can handle multiple but scales poorly to thousands of series.
Missing values and anomalies. A missing sensor reading is information (the sensor turned off), not NaN. Linear interpolation destroys this signal. Proper handling depends on the missingness mechanism.
Cold start. A new SKU in a 50,000‑item assortment has no history, yet a forecast is needed. Standard approaches fail; cross‑learning or feature‑based methods are required.
Why is model selection critical for your data?
Prophet (Meta) – a solid start for business data with clear seasonality and holidays. Fast setup, interpretable, built‑in outlier detection. Fails on irregular patterns and does not scale beyond ~10k series without parallelization.
Gradient boosting on features (LightGBM, XGBoost) – often underestimated. Engineer lags (t‑1, t‑7, t‑28), rolling means, day‑of‑week, holidays. The model trains on all series simultaneously, solving cold start via transfer learning. MAPE in retail often beats neural nets with proper feature engineering.
TFT (Temporal Fusion Transformer) – a transformer designed for interpretable forecasting with covariates. Built‑in variable selection, temporal attention, quantile outputs. Available in pytorch‑forecasting. Requires ~10,000+ records per series for stable training.
PatchTST – splits the series into patches (like ViT for images), capturing local patterns better than classic transformers. Excellent for long‑horizon forecasting (96–720 steps ahead).
N‑HiTS, N‑BEATS – attention‑free neural architectures, faster than TFT, competitive accuracy. N‑BEATS won the M4/M5 benchmarks for tasks without covariates.
| Method |
Covariates |
Scale (series) |
Interpretability |
Complexity |
| Prophet |
Yes (regressors) |
Up to 10k |
High |
Low |
| LightGBM + features |
Yes |
100k+ |
Medium |
Medium |
| TFT |
Yes |
1k–100k |
High |
High |
| PatchTST |
No/limited |
Any |
Low |
Medium |
| N‑HiTS |
No |
Any |
Low |
Low |
How do we deploy TFT in production?
A typical pipeline via pytorch‑forecasting:
training = TimeSeriesDataSet(
data,
time_idx="time_idx",
target="sales",
group_ids=["store", "sku"],
min_encoder_length=max_encoder_length // 2,
max_encoder_length=max_encoder_length, # 120 days
min_prediction_length=1,
max_prediction_length=max_prediction_length, # 28 days
static_categoricals=["store_type", "category"],
time_varying_known_reals=["price", "promo_flag"],
time_varying_unknown_reals=["sales"],
target_normalizer=GroupNormalizer(groups=["store", "sku"], transformation="softplus"),
)
A common mistake: the default target_normalizer (StandardScaler) breaks predictions for series with zero values (no sales on weekends). GroupNormalizer with transformation="softplus" is the correct choice for count data.
Case study: retail demand forecasting
A chain of 120 stores, 8,000 SKUs, 28‑day forecast horizon. The original system: SARIMA per series, MAPE 18.4%, retraining cycle – 6 hours. We replaced it with TFT on PyTorch + pytorch‑forecasting: a single model for all series, MAPE 11.2%, retraining – 40 minutes on an A10G. Feature importance via variable selection revealed that day_before_holiday influences more than the holiday date itself. Annual savings on inference alone exceeded $50,000.
Step‑by‑step configuration
-
Data collection and preparation. Handle missing values (mark NaN, interpolate only for technical failures), aggregate to required frequency, engineer covariates (holidays, promotions, prices).
-
Create
TimeSeriesDataSet. Set group_ids (store + SKU), time index, forecast horizon. Choose target_normalizer based on target distribution.
-
Train a baseline. Prophet or LightGBM first – to understand complexity.
-
Train TFT. Use
TemporalFusionTransformer with loss=QuantileLoss(), tune learning rate and hidden layer sizes.
-
Validate and interpret. Walk‑forward test, analyze variable selection, build attention heatmaps.
How to properly evaluate forecast quality?
RMSE alone is misleading – it over‑penalizes large values. Our standard set:
-
MAPE – interpretable, unstable near zero.
-
sMAPE – symmetric, avoids division by small numbers.
-
MASE (Mean Absolute Scaled Error) – normalized relative to a naive seasonal forecast, ideal for comparing series of different scales.
-
Pinball loss – for probabilistic forecasting, inventory management.
| Metric |
When to use |
Drawback |
| MAPE |
Business reporting, series without zeros |
Unstable for small values |
| sMAPE |
Model comparison |
Asymmetric interpretation |
| MASE |
Multi‑scale series, benchmarks |
Needs seasonal naive baseline |
| Pinball loss |
Probabilistic models |
Multiple values for different quantiles |
We guarantee a model card with these metrics on the validation set and walk‑forward results on at least 6 months of history.
What deliverables do you receive?
- Documentation of chosen architecture and hyperparameter rationale.
- Reproducible training and inference pipeline (Docker + CI/CD + Airflow/Prefect).
- Committed code with unit tests for key components.
- Team training: retraining, output interpretation, deployment of new versions.
- 3 months of post‑delivery support (consultations, bug fixes, fine‑tuning).
The model is deployed via FastAPI or Triton Inference Server. Retraining is scheduled (e.g., weekly) via Airflow with drift validation and automatic rollback if metrics deteriorate.
Process and timeline
We start with EDA: visualization, ADF test, STL decomposition, analysis of missing values and outliers. This takes 2–3 days but often reveals systemic data issues that block forecasting. Then we build a baseline (naive seasonal, Prophet), engineer features for LightGBM, and select a neural architecture if needed. Walk‑forward validation with a realistic horizon. Deployment via API with automatic retraining scheduled via Airflow or Prefect.
Timeline: MVP forecast on one data type – 3–6 weeks. Hierarchical forecasting system with automation – 2–5 months. Cost is calculated individually based on data volume, number of series, and required accuracy.
Our team consists of certified ML engineers (AWS ML Specialty, GCP Professional ML Engineer) with 5+ years on the market and over 50 completed forecasting projects. Contact us for a free analysis of your data – we will assess the task and provide initial recommendations within 1–2 days. Request a consultation to ensure your forecasts work in production, not just in a notebook.