In time series data, why do many models require the data to be stationary?
Think about what it means for data to have consistent behavior over time.
Stationarity means the data's statistical properties like mean and variance do not change over time. This helps models learn stable patterns and make reliable predictions.
What is the output of the following Python code that creates a lag feature?
import pandas as pd data = pd.Series([10, 20, 30, 40, 50]) lag_1 = data.shift(1) print(lag_1.tolist())
Recall that shift(1) moves data down by one position, introducing a missing value at the start.
The shift(1) function moves all values down by one, so the first value becomes nan and the rest are previous values.
You have monthly sales data with clear yearly seasonality. Which model is best suited to capture this pattern?
Consider models designed to handle seasonality in time series.
SARIMA extends ARIMA by including seasonal terms, making it suitable for data with repeating seasonal patterns.
Which error metric is most appropriate when you want to measure the average percentage error in time series forecasts?
Think about which metric expresses error as a percentage.
MAPE expresses forecast errors as percentages, making it easy to understand relative error size.
A time series model trained on daily temperature data shows poor predictions on recent data. Which issue is most likely causing this?
Consider what happens when the data pattern changes after training.
Concept drift means the data distribution changes over time, so a model trained on old data may not predict well on new data.