Add N-HiTS-comparison traffic example under gists/timeseries/nhits - #52
Merged
Conversation
Forecast the last 120 steps of an hourly traffic-volume series with NNS.ARMA (MAE ~236) -- no neural network or training loop -- framed against the N-HiTS deep-learning forecaster. Includes the script, a README in the gallery style, and the generated figure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxVLKYqazC2uuAW3P3MbAm
The datasciencewithmarco walkthrough forecasts the same Interstate 94 series with the same last-120 split and MAE metric: N-HiTS scores 266 and N-BEATS worse, and neither beats the naive seasonal baseline (249). NNS lands 236, beating all three. Document the comparison table and source it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxVLKYqazC2uuAW3P3MbAm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
gists/timeseries/nhits/— a third entry in the examples gallery, with a genuine head-to-head against the N-HiTS deep-learning forecaster (AAAI 2023).Marco Peixeiro's All About N-HiTS forecasts the hourly Interstate 94 traffic series — same dataset, same
[:-120]/[-120:]split, same MAE metric this example uses.NNS.ARMA(seasonal periods fromnns_seas, MAE objective, no neural network or training loop) lands MAE 236, beating the article's results:The article's own conclusion is that neither N-HiTS nor N-BEATS beats the naive seasonal baseline on this series; NNS is the only method that does.
Contents
nhits_traffic.py— runnable script (writes the figure for the README).README.md— gallery-style framing, the head-to-head table sourced to the article, the forecast plot, and a "how it works" walkthrough.nhits_traffic_forecast.png— generated figure (actual vs. forecast).Notes
gists/is excluded from ruff; pure examples/docs, no package or test changes.🤖 Generated with Claude Code