1
$\begingroup$

In forecasting the performance of many agents in a time series, there is a strong seasonality component, in addition to non-seasonal features for each agent. How can I capture the overall seasonal trends in my model building process without overfitting? Currently, I'm using a time-series cross validation approach to fitting a Random Forest Regressor or Gradient Boosting Regressor. I have many samples of data, but only a couple years to train on. Normally, I would not want to "look ahead" at future data to avoid overfitting on a time series; however, it seems that this is necessary to extract the seasonality signal and model performance.

Edits:

I hypothesize that if I extract the overall seasonality signal from agent performance in aggregate, there should be less concern of overfitting to this aggregate seasonality signal. I suspect there's a well-defined methodology for doing this.

Example row (simplified for illustration) for an agent. Similar rows would exist for each day of the year for this given agent, and for all 1,000+ agents we're forecasting:

  • agent_id: '1'
  • size: '22.2'
  • country: 'US'
  • type: 'A'
  • date: '2016-12-01'
  • performance_last_15_days: 80
  • performance_last_30_days: 156
  • performance_last_45_days: 251
  • performance_next_45_days (target): 260

In the example, we are adding various historical rolling windows of past target performance as features for training.

Looking at the data in aggregate, a strong seasonal trend is detected across agents. We only have up to 2 years' data for each agent.

$\endgroup$
  • 1
    $\begingroup$ You are quite correct that you don't want to "look ahead" . Why don't you post one example for one of your samples. $\endgroup$ – IrishStat Jan 14 '17 at 17:16
  • $\begingroup$ Sure, I have just now made a couple edits, including an example $\endgroup$ – Brian Bien Jan 14 '17 at 17:36
  • $\begingroup$ ok so now actually post the data in a csv format for all two years for 1 agent $\endgroup$ – IrishStat Jan 14 '17 at 17:52
  • $\begingroup$ Unfortunately, I can't share it. I tried my best to explain some of what I believed to be the important key aspects of it. Also, I'm interested in a general approach to similar situations, as opposed to just an answer to my specific problem. $\endgroup$ – Brian Bien Jan 14 '17 at 17:55
  • $\begingroup$ If you are trying to use daily data to make a prediction then look at some of my posts by searching for "USER 3382 DAILY DATA" . It might be of some help. I f you wish to chat offline about details please send me an email. You might also want to look at stats.stackexchange.com/questions/253912/… for a discussion of determining optimal window size. $\endgroup$ – IrishStat Jan 14 '17 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.