Sea Turtle Rescue Forecast Challenge

This competition is hosted on Zindi, a machine learning platform for data science challenges.

TL;DR: Time series and supervised learning are not competitors — they're stackable. Use TS forecasts as features in an ML model, with expanding-window backtesting to create training data for the hybrid. This captures both temporal patterns and cross-entity intelligence.

The Problem

Sea turtle rescue counts follow patterns tied to ocean currents, weather, and nesting seasons — but they're noisy, sparse, and interrupted. Local Ocean Conservation in Kenya rescues turtles caught in fishing nets across 29 sites. The goal was to forecast how many turtles each site would rescue each week in 2019, so staff and budget could be allocated in advance.

This is a multi-site time series problem with several complicating factors. Most site-weeks have zero rescues (the data is count-based and sparse). There's strong seasonality with approximately 44-week periodicity, but it's not perfectly regular. And critically, 2016 shows a structural drop in rescue counts — an anomalous year that would contaminate any model trained naively on the full history.

The tension in this problem is between temporal patterns (which a time series model captures well) and cross-site patterns (which a supervised model can learn). A pure ETS model per site captures seasonality but can't learn that similar sites share patterns. A pure gradient-boosted model can use site features but struggles with temporal structure in sparse count data. I needed both.

My Approach

I built a hybrid system: time series forecasts as features for a supervised model. The idea is simple but the implementation requires careful engineering. First, I generated per-site STL+ETS forecasts that capture seasonality and trend. Then I used those forecasts as input features in a CatBoost model that also sees site characteristics, cluster membership, and cross-site rescue patterns. The supervised model learns when and how to deviate from the time series baseline.

But there's a training problem with this approach: if I only generate a time series forecast for 2019 (the test year), the supervised model has no training rows where both the TS prediction and the actual outcome are known. The fix was expanding-window backtesting — generating time series forecasts for every historical year using only data available before that year. Forecast 2014 using data up to 2013. Forecast 2015 using data up to 2014. Skip 2016 entirely (the anomalous year). Forecast 2017 and 2018 similarly. Now the supervised model can train on 2014-2018 rows where the TS forecast feature exists alongside known actuals.

Year 2016 was excluded entirely from both time series fitting and supervised training. Rather than trying to model or explain the structural drop, I treated it as contamination. Including it would have pulled seasonal estimates downward and taught the model a pattern that doesn't represent normal behavior. Sometimes the best thing you can do with anomalous data is remove it cleanly.

The final ensemble weighted 70% time series and 30% CatBoost. The TS model dominates because this is fundamentally a seasonal problem — but the supervised model contributes meaningful corrections based on site category, cluster membership, and cross-site rescue frequency patterns that the TS models can't see.

Key Decisions

Time Series Forecast as a Feature in Supervised Model

Rather than choosing between TS and ML, I used the TS forecast as input to the ML model. This lets the supervised model learn when the time series is reliable and when to override it — capturing the best of both paradigms.

Expanding-Window Backtesting for Training Data

Generating TS forecasts for every historical year creates training rows where both the forecast and the actual outcome exist. Without this, the supervised model would have no training signal for the TS feature — the key that makes the hybrid work.

Year 2016 Exclusion

Rather than modeling the anomalous structural drop, I removed 2016 entirely. Including it would contaminate seasonal patterns and teach the model behavior that doesn't represent normal conditions. Clean exclusion is often better than complex anomaly modeling.

Outlier Capping in Time Series Forecasts

ETS can produce extreme predictions for high-variance sites. A guard rail capping at mean + 5×sd per site prevents runaway forecasts while preserving the shape of reasonable predictions. This protects the downstream supervised model from garbage inputs.

Key Takeaway

The core insight from this project is that time series and supervised learning are not competing paradigms — they're complementary layers that can be stacked. The time series model captures what it does best (seasonality, trend) and the supervised model captures what it does best (cross-entity patterns, feature interactions). The expanding-window backtesting is the engineering trick that makes this fusion trainable. Whenever I face a multi-entity forecasting problem now, this hybrid architecture is my default starting point.

Design insight: Time series and supervised learning are not competitors — they're stackable. Use TS forecasts as features in an ML model, with expanding-window backtesting to create training data for the hybrid. This captures both temporal patterns and cross-entity intelligence.

FAQ

What is the key takeaway from "Sea Turtle Rescue Forecast"?

Time series and supervised learning are not competitors — they're stackable. Use TS forecasts as features in an ML model, with expanding-window backtesting to create training data for the hybrid. This captures both temporal patterns and cross-entity intelligence.

Who wrote this and what is it about?

This was written by Mahmoud Trigui, Senior Data Scientist. Forecasting weekly sea turtle rescues in Kenya using smoothed historical averages and time series decomposition. Ranked Top 59% (95/259 competitors) on Zindi, March 2020.

Comments

Machine Learning Feature Engineering MLForecast Time Series Decomposition Forecasting LightGBM XGBoost Catboost Clustering Segmentation NLP LLMs Web App R Markdown SQL Oracle DB SAS-Guide SAS E-Miner Dataiku BigQuery GCP Python R CRISP-DM Hypothesis Testing ANOVA Data Analytics Dimensionality Reduction Recommendation System Network Analysis Geospace Analysis Spatial Data Embedding Sampling Techniques Decision Rules Data Storytelling CVM Churn Fraud Detection Sentiment Analysis Topic Modeling IBM Watson PowerBI Looker Studio VBA Statistical Learning Ensemble Modeling Stacking Cross-Validation Profiling ABT Construction Plumber Tidyverse Shiny Prophet Deep Learning Scikit-Learn JSON SAS Programming Git VS Code CSS Styling Automated Reporting Outlier Detection Temporal Clustering Startup Survival Pre-Valuation Modeling K-Means Decision Trees Data Science Predictive Modeling SVM LDA Text Classification Weight Prediction Pattern Recognition Real-Time Detection Community Detection Pipeline Automation Data Quality Checks Data Reliability Specification Mapping Business Strategy Marketing Campaigns Try & Buy Frameworks KPI Dashboards Network Quality Sales Analytics Mentoring Statistics Lecturer Remote Work Hybrid Work Consulting Contract Full-Time Freelance Sofrecom Orange Group Tunisia Telecom Kiota Intelligence VC Analytics Series A Prediction Production ML Applied AI Prompt Engineering Business Forecasting Decision Systems Graph Analytics Household Detection Multi-SIM Detection FTTH Forecasting Audit Extraction Infrastructure Classification Pydantic GPT-4 OpenAI API Base64 Classification Zindi Codementor LAAS-CNRS ESSAI MIT xPRO Tunisia ML Competition Cell Tower Analysis Uber Logistics Uber Cape Town Necessary Condition Analysis Behavioral Signals Spike Smoothing Observation Unit Design Dendrogram Ward Clustering VIF Target Encoding Machine Learning Feature Engineering MLForecast Time Series Decomposition Forecasting LightGBM XGBoost Catboost Clustering Segmentation NLP LLMs Web App R Markdown SQL Oracle DB SAS-Guide SAS E-Miner Dataiku BigQuery GCP Python R CRISP-DM Hypothesis Testing ANOVA Data Analytics Dimensionality Reduction Recommendation System Network Analysis Geospace Analysis Spatial Data Embedding Sampling Techniques Decision Rules Data Storytelling CVM Churn Fraud Detection Sentiment Analysis Topic Modeling IBM Watson PowerBI Looker Studio VBA Statistical Learning Ensemble Modeling Stacking Cross-Validation Profiling ABT Construction Plumber Tidyverse Shiny Prophet Deep Learning Scikit-Learn JSON SAS Programming Git VS Code CSS Styling Automated Reporting Outlier Detection Temporal Clustering Startup Survival Pre-Valuation Modeling K-Means Decision Trees Data Science Predictive Modeling SVM LDA Text Classification Weight Prediction Pattern Recognition Real-Time Detection Community Detection Pipeline Automation Data Quality Checks Data Reliability Specification Mapping Business Strategy Marketing Campaigns Try & Buy Frameworks KPI Dashboards Network Quality Sales Analytics Mentoring Statistics Lecturer Remote Work Hybrid Work Consulting Contract Full-Time Freelance Sofrecom Orange Group Tunisia Telecom Kiota Intelligence VC Analytics Series A Prediction Production ML Applied AI Prompt Engineering Business Forecasting Decision Systems Graph Analytics Household Detection Multi-SIM Detection FTTH Forecasting Audit Extraction Infrastructure Classification Pydantic GPT-4 OpenAI API Base64 Classification Zindi Codementor LAAS-CNRS ESSAI MIT xPRO Tunisia ML Competition Cell Tower Analysis Uber Logistics Uber Cape Town Necessary Condition Analysis Behavioral Signals Spike Smoothing Observation Unit Design Dendrogram Ward Clustering VIF Target Encoding