When doing supervised learning classification, how can I account for seasonal data?

Here is a very simple example to consider

  • Classify loans as either being defaulted on or not
  • Data entries have a numerical loan amount and a date

Time is important here because there can be seasonal trends in spending that can help classify if a loan will be defaulted on or not.

Is there an algorithm or approach to classifying that can account for this seasonality in data?

I have looked online and there are recommendations for the Hidden Markov Model. However from my understanding, the HMM for time series would classify based on a direction of trend. In the context of the given problem, classifying the direction of trend is different than classify on defaulting or not.

Please let me know if there is another stackexchange site is more appropriate for this questions.

  • $\begingroup$ Is it fair to say, that date is a feature ? Your classification model should incorporate the date as a feature. This is not time series data and you are not regressing over that series. Correct ? $\endgroup$ Commented May 25, 2017 at 21:10
  • $\begingroup$ Yes I claim that date would be a feature. $\endgroup$
    – Rohan
    Commented May 25, 2017 at 21:51
  • 1
    $\begingroup$ In which case, convert dates as a feature vector and use the same in your classification algorithm. You could represent date as a vector with an appropriate encoding that denotes the importance of the date. Just thinking out loud. No ? $\endgroup$ Commented May 26, 2017 at 9:13

1 Answer 1


There are 3 basic ways to deal with this:

  1. Sample from all time periods, add time period as a feature in model training
  2. Sample from all time periods, build a model for each time period (ie season)
  3. Sample from single time period, after model is trained, adjust probabilities based on seasonal averages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.