Predict trend from time series data

This is a demonstration of carrying out a part of the Hybrid Models tutorial of the Time Series course on Kaggle using polars instead of pandas.

Download the example time series data:

Add 'date' column.

Manipulating the 'Month' column before strptime-ing because strptime-ing with '%Y-%m' does not work for reason dunno.

Split the time series data into train part and test part:

Generate quadratic trend dataframe in order to fit the linear regression model:

Fit the linear regression model and plot the fitted and predicted trends:

TODO: preidct annual seasonality and cyclical features from detrended residuals.