I am trying to predict anomalies using an isolation forest model with daily time series data. Do I need to make sure my data is stationary as I have observed weekly seasonality? I read that you need stationary time series data for forecasting and predicting future events, however, an isolation forest model is not technically forecasting.

Generally, if you are using time series data for a machine learning model, when does your data need to be stationary?

  • $\begingroup$ How do you want to use isolation forest with time series data? $\endgroup$
    – frank
    Sep 30, 2022 at 3:55

1 Answer 1


Tree based algorithms may struggle with non-stationary time series data. Especially when there is trend present, the future values of the series may have a very different distribution. For seasonality, this can be addressed by including seasonality factors in the features. But, it is easier for the forest to isolate samples when the effect of trend and seasonality are factored out. Generally speaking, a method should have the ability to (even implicitly) deduce trend and seasonality somehow to deal with this kind of data (e.g. SARIMA).


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.