# Decathlon

> Exploring how holidays, weather and events can improve sales forecasts through covariate research and feature engineering.

Data Scientist & ML Engineer · March 2024–February 2025

Category: Experience

[Open in the interactive portfolio](<https://zaki.somehow.engineer/#experience/10>)

[Français](<https://zaki.somehow.engineer/read/fr/decathlon.md>)

## At a glance

| Metric | Value |
| --- | --- |
| My role | Data Scientist & ML Engineer |
| Location | Croix / Lille, France |
| Employment period | March 2024–February 2025 |
| Forecast model | Temporal Fusion Transformer |

## My work at Decathlon

At Decathlon Digital, I worked mainly on forecasting covariates: additional inputs such as public holidays, school vacations, weather and events that might help explain changes in demand. My work involved preparing external data, engineering features and evaluating whether those signals added useful information to sales forecasts.

I started with an internship from March to September 2024, then continued working at Decathlon until February 2025.

The example below comes from my internship report and focuses on calendar variables in an existing Temporal Fusion Transformer forecasting model. The detailed scope of my subsequent work is confidential. The wider forecasting platform was a team effort.

### Images and media

[Where forecasting sits in the wider supply-chain context.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/planning-context.jpg>)

Company diagram placing planning alongside industrial processes, production, transport, logistics and retail.

Credit: Decathlon · Supply & Material Planning, p. 7. Company context.

## Build a calendar dataset the model can use

Before training anything, I had to find calendar sources with enough history, future coverage, regional detail and a dependable update process. I compared government data, Date Holidays, Workalendar and Open Holiday API with input from data stewards.

I aligned the selected calendar information with weekly sales data, including the date, holiday name and its position in the week. School-vacation coverage varied across sources, so I began that part of the analysis with France and its three school zones. Preparing comparable data was a substantial part of the work.

Python / Pandas · PySpark · Databricks · MLflow · Nixtla / TFT · Matplotlib / Seaborn

From external dates to forecasting features

1. **Source** — Check date coverage, regional detail, reliability and maintenance.
2. **Align** — Connect calendar dates to the weekly sales index and relevant geography.
3. **Encode** — Represent holiday timing and vacation periods as model inputs.

Summary of the data preparation described in the report, pp. 17–20 and 33–34.

### Images and media

[The criteria used to evaluate candidate calendar sources.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/source-selection.jpg>)

Presentation slide comparing date range, content, trustworthy sources and maintenance as data-selection criteria.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 17. Original presentation figure.

## Check the analysis before extending the model

A recurring event can already be partly represented by seasonality. I decomposed the sales series into trend, seasonal and residual components to investigate what additional signal calendar features might offer.

I also had to revisit early findings. An apparent lag before a holiday disappeared after correcting the implementation. I reran the analysis and compared less seasonal products as well as aggregate sales. That correction mattered: an appealing explanation of buying behaviour was not enough to make a feature useful.

### Images and media

[Separating recurring seasonal structure from the residual variation being investigated.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/decomposition.jpg>)

Presentation showing the observed series, trend, seasonal component and remainder.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 25. Original presentation figure.

[A corrected rerun changed the apparent holiday-lag pattern; the earlier plot is shown for comparison.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/analysis-correction.jpg>)

Old and corrected boxplots for sales around weekday and Saturday holidays.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 29. Original presentation figure.

## Turn dates into features

I explored holiday flags, long weekends and a countdown to the next holiday. A Day Counter represented how close the holiday’s weekday was to the weekend, using values from 0 to 3. The experiments also considered week/month representations and French school vacations.

The representation itself became an experiment. After team feedback, I compared scalar and one-hot encodings, applied MinMax scaling to the holiday countdown and tested sine/cosine representations of week and month. Different encodings gave the model different ways to use the same calendar information.

### Images and media

[A compact representation of a holiday’s position relative to the weekend.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/calendar-encoding.jpg>)

Day Counter diagram with values zero on Saturday and Sunday, one on Monday and Friday, two on Tuesday and Thursday, and three on Wednesday.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 32. Original presentation figure.

[The feature combinations compared in the revised experiments.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/feature-combinations.jpg>)

Matrix of experiment variants combining long weekends, holiday countdown and week/month representations.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 41. Original presentation figure.

## Backtest the idea, then look inside the score

I compared model variants with the existing production-model baseline in offline tests. The report describes a 52-week forecast horizon and five cutoffs: weeks 37 and 47 of 2022, and weeks 5, 15 and 25 of 2023. Using several cutoffs made it possible to inspect performance across different parts of the year.

The first aggregate comparison did not improve on the baseline, while a Top 400 product analysis was more promising. I then refined the encodings and ran another benchmark. The report records training runs of roughly three to four hours, so choosing and documenting each experiment was important.

How the forecasting variants were evaluated

1. **Compare** — Use the same reported reference model and evaluation horizon.
2. **Break down** — Inspect cutoffs, product groups and the Top 400 product subset.
3. **Revise** — Use the findings and team feedback to choose the next feature encoding.

Evaluation workflow from the report, pp. 36–43. Runtime is the report’s approximate per-training-run account.

## A modest gain, and a change in ranking

The revised global benchmark reported a baseline WAPE of 41.20 and two variants at 40.91 and 40.83. Lower WAPE means lower forecast error in this evaluation. The best displayed global result was approximately 0.37 lower on the reported WAPE scale.

The result did not carry over uniformly. The best global variant was not the best on the Top 400 subset, where a different encoding performed better. That was the useful conclusion: a feature needs to be evaluated with the products and periods it is intended to serve.

| Value | Metric |
| --- | --- |
| 41.20 | Baseline WAPE |
| 40.83 | Best reported global WAPE |
| 0.37 | Lower on the WAPE scale |
| 52 weeks | Forecast horizon |

> Offline evaluation documented in the 2024 report. Displayed scores are rounded to two decimals; the source table shows 41.2016 and 40.8329. These are benchmark results, with no production rollout or business savings established by the report.

### Images and media

[The revised global benchmark. “Global” refers to the aggregation in this evaluation, not every production series.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/benchmark-global.jpg>)

Global benchmark table showing baseline WAPE 41.2016 and the best displayed variant at 40.8329, evaluated across five cutoffs.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 42. Original presentation figure.

[The same variants on a product subset: the ranking changes.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/benchmark-top400.jpg>)

Top 400 benchmark table showing baseline WAPE 19.2801 and different variant rankings from the global table.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 42. Original presentation figure.

## Use interpretation to decide what to test next

I inspected model feature importance to understand which inputs the TFT was using. The holiday countdown ranked highly alongside the previous season’s sales. That was a useful diagnostic, while the backtest remained the evidence for forecast quality; an importance score alone does not establish a causal effect.

I documented the work in Confluence, followed the team’s Jira workflow and presented the findings in English to an international team. Feedback directly shaped the next encoding experiments. What I took from the experience was a more disciplined way to build: state the question, check the data and implementation, run the comparison, and explain where the result holds.

### Images and media

[Inspecting which inputs the model used, alongside the forecast benchmark.](<https://zaki.somehow.engineer/content/assets/decathlon/case-study/feature-importance.jpg>)

TFT feature-importance plot showing days until next holiday and sales quantity last season as the highest-ranked displayed variables.

Credit: Zaki Gouizi · Decathlon internship report, 2024, physical p. 43. Original presentation figure.
