← Back to all products

Demand Forecasting Accelerator

$2490

ML-based hourly demand forecasting (Gradient Boosting + MLflow) with rolling 72h forecasts, automated MAE/RMSE/MAPE monitoring by horizon, and weekly retraining. Ships a dependency-free feature-engineering library + offline tests. Fully generic Databricks Asset Bundle.

📁 17 files🏷 v1.0.0
Production-readyUnit-testedDatabricks Asset Bundle
✓ Instant download✓ Lifetime updates✓ MIT licensed✓ Secure checkout (Stripe)

⚙ Try the Live Demo interactive

See how heating/cooling degree-days and daily seasonality drive a 48-hour demand curve — the accelerator's feature logic, live.

⚡ Open Demand Simulator

📋 What's Inside 17 files

  • README.md
  • LICENSE
  • manifest.json
  • databricks.yml
  • resources/jobs.yml
  • src/model/train_model.py
  • src/model/run_inference.py
  • src/monitoring/01_accuracy_kpis.sql
  • src/monitoring/02_data_quality.sql
  • lib/demand_features.py
  • tests/test_demand_features.py
  • conftest.py
  • guide/01_what-you-get.md
  • guide/02_getting-started.md
  • guide/03_architecture.md
  • guide/04_support.md
  • guides/demand-forecasting-methodology.md

📁 File Structure 17 files

demand-forecasting-accelerator/
├── README.md
├── LICENSE
├── manifest.json
├── databricks.yml
├── resources/
│   ├── jobs.yml
├── src/
│   ├── model/
│   │   ├── train_model.py
│   │   ├── run_inference.py
│   ├── monitoring/
│   │   ├── 01_accuracy_kpis.sql
│   │   ├── 02_data_quality.sql
├── lib/
│   ├── demand_features.py
├── tests/
│   ├── test_demand_features.py
├── conftest.py
├── guide/
│   ├── 01_what-you-get.md
│   ├── 02_getting-started.md
│   ├── 03_architecture.md
│   ├── 04_support.md
├── guides/
│   ├── demand-forecasting-methodology.md

📖 Documentation Preview README excerpt

Demand Forecasting Accelerator

ML-based **hourly demand forecasting** with automated accuracy monitoring and

weekly retraining, packaged as a deploy-ready Databricks Asset Bundle. Trains a

Gradient Boosting model on consumption + weather history, produces rolling

72-hour forecasts, and tracks MAE/RMSE/MAPE by horizon. Typical **10–30% MAE

improvement** over rule-based methods.

Fully generic and environment-agnostic: configure your own catalog/schema and

source tables. No organization-specific dependencies.

What's inside

- **Databricks Asset Bundle** — inference (every 2h), accuracy monitoring

(daily), and weekly retraining jobs with MLflow model registry.

- **Training + inference notebooks** — GBM with calendar, cyclical, degree-day,

and lag features; recursive multi-step forecasting.

- **Accuracy + data-quality SQL** — MAE/RMSE/MAPE by horizon bucket and

freshness checks.

- **A dependency-free feature library** (`lib/demand_features.py`) that mirrors

the notebook feature engineering, with an offline test suite (6 tests).

Why degree-days

Heating and cooling load track **degree-days** (distance of temperature from a

comfort base), not raw temperature. That single transform is the most

predictive weather feature — see `guides/demand-forecasting-methodology.md`.

Quickstart

```bash

pip install pytest && pytest tests/ -v # validate feature logic offline

databricks bundle deploy -t dev -p <profile>

```

Provide `hourly_consumption`, `weather_observations`, and `weather_forecasts`

tables (schemas in `guide/03_architecture.md`).

License

MIT — see `LICENSE`.

... preview truncated, see full README in product download.

📄 Code Sample .py preview

src/model/train_model.py# Demand Forecasting Accelerator: Model Training # ============================================== # Trains a Gradient Boosting demand model on historical consumption + weather # and registers it in the MLflow Model Registry. Fully generic — all catalog/ # schema/table names come from bundle variables. The feature engineering mirrors # lib/demand_features.py (calendar + cyclical + degree-days + lags). # Databricks notebook source import mlflow import mlflow.sklearn import numpy as np import pandas as pd from datetime import datetime from sklearn.ensemble import GradientBoostingRegressor from sklearn.metrics import mean_absolute_error, mean_squared_error # COMMAND ---------- catalog = spark.conf.get("bundle.var.catalog") schema = spark.conf.get("bundle.var.schema") model_name = spark.conf.get("bundle.var.model_name", "demand-forecast") # COMMAND ---------- # Load 2 years of hourly consumption + weather. Adapt column names to your source. consumption = spark.sql(f""" SELECT start_time AS timestamp, SUM(energy_mwh) AS actual_mwh FROM IDENTIFIER('{catalog}.{schema}.hourly_consumption') WHERE start_time >= DATEADD(YEAR, -2, CURRENT_TIMESTAMP()) GROUP BY start_time """).toPandas() weather = spark.sql(f""" SELECT timestamp, temperature_c, wind_speed_ms, cloud_cover_pct FROM IDENTIFIER('{catalog}.{schema}.weather_observations') WHERE timestamp >= DATEADD(YEAR, -2, CURRENT_TIMESTAMP()) """).toPandas() # COMMAND ---------- # Feature engineering (see lib/demand_features.py for the reference logic + tests) df = consumption.merge(weather, on="timestamp", how="left").sort_values("timestamp") df["hour"] = df["timestamp"].dt.hour