I am currently working on a project aiming of classification of process states based on time series data. For this, we are looking at different models, such as XGBoost-based classifiers or RandomForest-based classifiers. I am aware of that both models are expecting tabularized data. Now, however, I am faced with two different points of view:

  • Cutting the raw data into shorter windows, and treat them as "tabularized" data before feeding it into the training algorithm, resulting in

    Time block Series data
    1 [0.5, 0.6, 0.7, 0.8, 0.9]
    2 [1.0, 1.1, 1.2, 1.3, 1.4]
    3 [1.5, 1.6, 1.7, 1.8, 1.9]
    4 [2.0, 2.1, 2.2, 2.3, 2.4]
    5 [2.5, 2.6, 2.7, 2.8, 2.9]
    6 [3.0, 3.1, 3.2, 3.3, 3.4]

    from a time series of [0.5, ..., 3.4]

  • Cutting the data into shorter windows, followed by feature extraction (such as mean(), abs(mean()), skewness() or similar data) from these windows. This then can be used for generating a table, such as

    Time block mean() median()
    1 0.7 0.7
    2 1.2 1.2
    3 1.7 1.7
    4 2.2 2.2
    5 2.7 2.7
    6 3.2 3.2

    from the same time series as given above, which then is used for training the classifier.

An argument for the first approach is that it is the simpler and easier approach, especially as one does not have to calculate all features. Another point of view I've seen is that the first approach should not work at all, but up to now without specific proof.

Thus, which of those sides are correct? Is it possible at all to use the first approach, or will it get wrong/incorrect/inaccurate results? And which resources could I use to check that?


1 Answer 1


There is not all-correct or all-wrong option here, but as I see both paths present limitations:

  • Treating a fixed window as tabularized features is simple as you pointed out but all your model is receiving is the sequential values from the timeseries. With tree-based models, all it will be able to do is come with rules like "if $y_{t-3} \geq 0$, then something" and the classification task you are looking at can demand more sofisticated decision making than that. Boosting methods can come up with more complex logic but this nature won't really change.

  • Computing the features mannually from a past window allows your model to make decisions based on much more complex and problem-specific logic, but in order to the model to come up with "if the standard deviation from the last 9 values is greater than the minimum divided by 3" you need to first create those specific features yourself. This approach requires that you understand the problem in a deeper way and create good features that make it easy for the model. Is with this in mind that lots of people go with neural networks for time series classification problems, the network learns how to extract good features.

I would go with 1 with you have very limited time, little problem knowledge and the problem is not too critical. 2 looks more promising with you can play with the feature engineering and knows something about the problem process (or has access to someone who does). If limited time, little problem knowledge and model performance is critical, I would try some neural network approach.


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.