Skip to content
Sanaz Hossain

Time Series & Forecasting

Where naive forecasting models break

Independent project, Time Series Analysis courseSenior year, spring semesterDeployed — 5 live Shiny appsR (fpp3, forecast, tsibble), Shiny, Google Trends data

Demonstrated naive and linear forecasting models fail on seasonal search-spike dataFound and fixed a silent null-return bug breaking every downstream forecast5 working apps deployed live on shinyapps.io

In senior year, I took a business-analytics course on Time Series Analysis — model-building techniques for linear time series, univariate forecasting, Box-Jenkins methods, exponential smoothing, and forecasting from regression models.

Can simple forecasting models predict something as spiky and seasonal as public interest in a reality show — or does that kind of data need more than a naive baseline?

For our midterm, predicting viewer trends, I built an interactive app forecasting interest in The Bachelorette using Google Trends data — pulling the show's monthly interest series (2004–present, ~245 points), structuring it as a tsibble, and exploring it through a Shiny interface with selectable views (time series, seasonality, autocorrelation, STL decomposition) before layering forecast models on top.

App one — descriptive plots only

TriedA Shiny app that reads the Google Trends data, converts it to a monthly tsibble, and lets the user switch between four views: raw series, seasonality, autocorrelation, and STL decomposition.
Fell shortSimple linear and baseline models collapsed under the show's seasonal search spikes, which is what made STL decomposition necessary just to isolate the true trend.

App two — a different kind of prediction

TriedA second app that, instead of forecasting the series, predicts the next Bachelorette's physical characteristics from how often each historical value occurred.
AssumedThat this counted as prediction at all — it is a "prediction" in name only, an empirical-frequency lookup rather than a forecasting model, useful mainly as a contrast to the time-series work.

Merged, and debugged

TriedThe two apps became one: seven real forecasting models (Mean, Naive, Drift, Seasonal Naive, TSLM, ETS, ARIMA) over a user-chosen horizon, alongside the descriptive views and the characteristics predictor.
Fell shortThe deployed forecast plot silently failed because its data-loading reactive ended on debug lines instead of returning the tsibble, so every downstream forecast returned NULL.
Held upMaking the reactive actually return the tsibble, and running the models on a proper monthly ts() object so the seasonal models had valid frequency information.
Code diff showing the broken forecast reactive and its fix
The broken reactive — debug lines instead of a return — and the fix.

In short

The exercise proved the exact point the course was making: simple linear and baseline models collapse under seasonal search-spikes, and only STL decomposition recovers the true trend..

The exercise proved the exact point the course was making: simple linear and baseline models collapse under seasonal search-spikes, and only STL decomposition recovers the true trend.

The app lets a viewer pick a model interactively rather than reporting one quantitative winner — it's built to be exploratory, not a verdict on which model performs best.

Seven forecasting models shown side by side in the deployed app
The final app's seven-model forecast switch, side by side.

Five apps live on shinyapps.io: the combined forecasting app, both midterm apps, and two smaller course exercises.

shinyapps.io dashboard showing five apps live
All five apps live on shinyapps.io.

Those mistakes were what I needed to actually understand the mechanics behind signal processing — how easily naive assumptions distort a prediction once real seasonality gets involved.

Predicting television search trends and tracking DNA damage seem worlds apart, but both showed me the same underlying pattern: a surge one week carries momentum into the next, the same way genomic regions near a damage site carry the residue of that damage. Television ratings depend on the week before them the same way a DNA sequence's structural integrity depends on how close it sits to a physical break.