Weighting time series data for prediction I am building a simple random forest to predict soccer results in sckit. I simply train the model to predict each teams score based on various features. However I am trying to think how I can weight the data so that more recent fixtures will be considered more than historic fixtures.
Any ideas?
 A: I agree with user Hidden Markov Model, when the underlying phenomena, which is generating the time series, is constant. On the other hand, if the dynamics of wins and losses transform as new football tactics appear, then very old time series are less representative of tomorrow than recent observations.
As S. Kolassa points out, time series cannot be plugged directly into RF or any other supervised regression method.
Typically for RF, a time series is treated with a rolling window generating learning examples how some past events ($X_{t-1}$ to $X_{t-k}$) coincided with some future outcome $X_t$. The model is free to up weigh any $k$ recent periods in the windows. But the regression model does not up weigh those learning examples/windows where $t$ is closest to present day by default. One can help RF up weigh recent examples by stratification. E.g. for each tree is bootstrapped(with replacement) 200 learning examples within last 200 periods of $t$ + 200 learning examples from the last 1000 periods of $t$.
Thus, when the underlying system could be transient it would make good sense to down sample distant-in-past learning examples/windows.
If your system of interest is both transient and noisy you're in trouble.
A: The random forest should pick this up automatically from the data itself. If data closer to the present has a stronger effect on your y predictor than earlier lags, then the coefficients will be larger for more recent lags and smaller for earlier lags. The regression coefficients, i.e., "weights", should be wholly determined by the data. If you do want to try a weighted time series, you can use Holt Winters Triple Exponential smoothing on your score variable and then see if a regression model with additional lagged features beats the time series model.
