Model Based Approach

The Model Based Approach to Time Series forecasting fits a mathematical model - built on explicit statistical assumptions - to describe how the data behaves over time.

The Core Idea

# A model based approach assumes the data follows a specific
# structure, and estimates the parameters of that structure.
#
# Example: ARIMA assumes the series can be described using
# its own past values and past forecast errors.

A Common Example: ARIMA

from statsmodels.tsa.arima.model import ARIMA

model = ARIMA(df["Sales"], order=(1, 1, 1))
fit = model.fit()

forecast = fit.forecast(steps=3)
print(forecast)

Advantages

Model based approaches are interpretable - you can examine the model's parameters to understand relationships like trend strength or how much past values influence the future - and they work well with limited data.

Limitations

These models rely on assumptions (like stationarity) that real-world data doesn't always satisfy, and they can struggle to capture complex, non-linear patterns.

Before fitting a model like ARIMA, it's common practice to check and, if needed, transform the series to make it stationary - a step often done using differencing.

Coming Up Next

Next, you'll learn about the Data Driven Approach, an alternative way to forecast Time Series.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course