NastępnyNastępny poradnik
Funkcje opóźnień w prognozowaniu szeregów czasowych
Techniczne
PRZEWODNIK techniczny
Walidacja typu walk-forward ocenia prognozy poprzez wielokrotne uczenie się na podstawie informacji dostępnych przed datą graniczną i testowanie w późniejszym okresie.
Posłuchaj tego przewodnikaOpowiadane przez sztuczną inteligencję · ~3 min
It helps estimate how a forecasting process would behave when it must predict genuinely future outcomes.
Forecasting asks what could have been predicted before an outcome occurred. A random train-test split often fails to represent that task because later observations can help train a model evaluated on earlier ones. Walk-forward validation advances a forecast origin through time and recreates the information boundary at each step. Choose an initial training period, a forecast horizon and a schedule for moving the origin. Train using the allowed history, predict the following period, save the predictions, and compare them with outcomes once available. Then move forward and repeat. An expanding window retains all earlier training data; a rolling window keeps only a recent span. Neither choice is universally best. The horizon should match the decision. A process that places orders four weeks ahead needs evaluation of four-week-ahead forecasts, not only next-day predictions. If the production model will be refitted monthly, an evaluation that refits every day may assess a different procedure. Write down both the horizon and update schedule. Features require the same discipline. A moving average must exclude the outcome being predicted. External information should be represented as it was available at the time, including publication delays and later revisions. A weather forecast available on the decision day is different from weather observations collected afterward. Scikit-learn's TimeSeriesSplit provides ordered training and test splits, with options for gaps and training-window limits. The split object alone cannot prevent leakage introduced while preparing features. Check every input's availability. Compare the model with a meaningful historical or seasonal baseline on identical forecast periods. Report errors by horizon and inspect changing conditions. A favorable average can conceal a period in which the process failed badly.
A hypothetical monthly forecast trains on January through June and predicts July, then trains through July and predicts August. Each prediction uses only information available at its forecast origin.
A retailer compares an expanding training window with a rolling window containing only the most recent six months. The choice changes how much old information influences each refit.
A forecasting pipeline shifts sales history before calculating a moving average. This prevents the target day's sales from appearing in the features used to predict that day.
An analyst uses scikit-learn's TimeSeriesSplit for ordered observations and checks its gap, test-size and training-window settings against the actual forecasting schedule.
Reliable forecast evaluation increasingly depends on keeping historical snapshots of what was known at each decision time. Teams can improve their backtests by saving feature versions, publication timestamps and the exact predictions issued before outcomes arrived. They should also compare performance across different seasons and operating conditions as enough data becomes available. A walk-forward report can then support a realistic decision about retraining or model replacement. The central requirement remains straightforward: every simulated forecast should obey the same information and timing constraints as the system people will actually use.
Darmowy newsletter
Trzy zweryfikowane historie AI każdego poranka w dni robocze, napisane prostym angielskim. Bezpłatne na zawsze, bez reklam.
Jedno e‑mail każdego dnia roboczego. Wypisz się jednym kliknięciem. Nigdy nie sprzedajemy ani nie udostępniamy Twojego adresu.
Sprawdź się
Natychmiastowa informacja zwrotna na każde pytanie oraz udostępnialny certyfikat z weryfikowalnym ID po zaliczeniu kursu.
Wspieraj darmową edukację AI. AI Understanding jest organizacją non-profit 501(c)(3) — bez reklam, bez płatnej ściany, zawsze. Przekaż darowiznę
Walk-forward validation evaluates forecasts by repeatedly training on information available before a cutoff and testing on a later period. It helps estimate how a forecasting process would behave when it must predict genuinely future outcomes.
Rozwijające się okno zachowuje wcześniejsze obserwacje i dodaje nowo dostępną historię przed początkiem następnej prognozy.
Różnica dotyczy tego, które obserwacje historyczne pozostają dostępne do dopasowania w miarę upływu czasu.
Trudność prognozowania i przydatne informacje zależą od tego, jak daleko w przód wymagana jest prognoza.
Model nie może uzyskać wyniku, który ma przewidzieć na podstawie cechy pochodnej.
Realistyczna analiza historyczna wykorzystuje informacje dostępne w momencie wydania prognozy, a nie wiedzę zdobytą później.
Ucz się dalej
Wybrano więcej przewodników na ten temat
NastępnyNastępny poradnik
Funkcje opóźnień w prognozowaniu szeregów czasowych
Techniczne