So I am using a linear regression with time as a trend variable (specifically, I am taking the # of months since user's first activity as the linear feature of time, and also including the log, sqrt, squared, etc., transformations of that for non-linear time features) and dummy variables for 11/12 months of the year to account for seasonality. I will use forward selection of some sort to pick time features.
My time series is a bit ridiculous, so I find that trend often changes as time goes on. Check out the attached image for one that I am looking at
As such, does anyone know a way I could add an inverse of exponential decay of some sort to the weights in the regression? As in, let's say I have 60 rows of data, from the very first month of user activity to the most recent month. I want to train the regression on all of these, but I want the regression to weight the most recent observations more. There doesn't seem to be a good weighted regression package in Python besides Huber regression, but I cannot apply the weighting I want in that.
I do not think the fact that user_age_in_months is greater at more recent periods than in the first few periods makes a significant difference, especially since I am min-max scaling, and this is different from an exponentially weighted moving average.
This is the closest answer I've seen to this question, but it doesn't really give an example and this isn't as applicable to Python: Assigning more weight to more recent observations in regression
Thanks!