0Pricing
Data Science Academy · Lekcja

Pierwszy model bazowy prognozowania

Prognozy naiwne i oparte na średniej ruchomej

Pierwszy model bazowy prognozowania to bezpłatna lekcja Data Science Academy na CoddyKit. To lekcja 4 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Data Science Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Data Science Academy zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

Always Start Simple

Before fancy models, you need a baseline: a dead-simple forecast that anything fancier must beat to earn its place. 🪜

The Naive Forecast

The simplest baseline is the naive forecast: predict that tomorrow equals today. Surprisingly hard to beat for steady data.

forecast = sales.iloc[-1]

Carrying the Last Value

A naive forecast just repeats the most recent observation forward. No trend, no season, just the latest known point.

The Seasonal Naive

For cyclical data, predict the value from one full season ago. This seasonal naive respects repeating patterns cheaply.

forecast = sales.shift(12)

Moving-Average Forecast

Another baseline averages the last few points. A moving average smooths out noise and projects that level ahead.

forecast = sales.tail(7).mean()

Split Before You Forecast

Keep the last chunk of time as a test set. Never shuffle it: time order must be preserved so the future stays unseen.

train, test = sales[:-30], sales[-30:]

Measure the Error

Compare predictions to the held-out truth with an error metric. MAE reports the average size of your mistakes in real units.

from sklearn.metrics import mean_absolute_error

The Number to Beat

Your baseline's error becomes the benchmark. Any model that scores worse is not worth its extra complexity.

Plot Truth Versus Forecast

Always plot the prediction over the real test values. Your eyes catch lag and bias that a single number can hide.

When Naive Wins

If a complex model cannot beat naive, trust the simple one. Simplicity that performs is a feature, not a failure.

Where to Go Next

With a baseline set, you are ready for real models like ARIMA or Prophet, each judged against this honest starting point.

Quick Check

What does a simple naive forecast predict for the next time step?

Recap: Earn the Complexity

You built naive, seasonal, and moving-average baselines, then measured error so future models must prove they are better.

Często zadawane pytania

Czy lekcja „Pierwszy model bazowy prognozowania” jest bezpłatna?

Tak — pełny tekst „Pierwszy model bazowy prognozowania” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Data Science Academy, przejdź na CoddyKit PRO. Kurs Data Science Academy zawiera 4 lekcji w sumie.

Co nauczysz się w „Pierwszy model bazowy prognozowania”?

Prognozy naiwne i oparte na średniej ruchomej Ćwiczysz Data Science Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć Data Science Academy?

Nie wymagamy żadnego doświadczenia. Data Science Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 4 z 4.

Ile czasu zajmuje lekcja „Pierwszy model bazowy prognozowania”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji Data Science Academy?

Tak. Każda lekcja Data Science Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Trend, sezonowość i szum
  2. Okna kroczące i opóźnienia
  3. Stacjonarność i różnicowanie
  4. Pierwszy model bazowy prognozowania
← Powrót do Data Science Academy