I just started to study time-series forecasting using RNN.

I have a few months of time series data that was an hour unit. The data is a kind of percentage value of my little experiment and I would like to forecast the future condition of this. Many tutorials and web info introduced direct training and forecasting the time series data without any data pre-processing.

But for the RNN (or ML and DL), I think we should consider the data's condition that is stationary or not.

My data is totally random condition which is stationary data (no seasonality, no trend).

For example, the US stock prediction tutorial showed super great accuracy forecasting performance according to many LSTM tutorials. [If this really works and is true, then all ML developers will be rich.]

And, Some of them didn't emphasize and note a kind of the data pre-processing such as non-stationary to stationary something like that.

According to my short knowledge, I think the non-stationary data such as stock price (will have trend) should be converted as a stationary format through differencing or some other steps. and I think this is a correct prediction as a view of theoretical sense even if the accuracy is not high.

So my point is, I'm a bit confused about whether that really is no need for any preprocessing to treat stationary or not.

For my case, I applied differencing step ($t_n - t_{n-1}$)to my time-series data in order to remove the trend or some periodic situation.

Is my understanding not correct?

Why do time-series forecasting tutorials not introduced data stationarity?

  • $\begingroup$ You stated that your data is 'totally random'. How do you know it is 'totally random'? Truly random time series data can not be forecasted. Stock price data is not random although it has some degree of randomness. $\endgroup$ Jun 9 at 18:10
  • $\begingroup$ You mentioned stock data and 'future condition'. That is very unclear. Are you trying to predict the future price of a stock given historical stock price data? $\endgroup$ Jun 9 at 18:11
  • $\begingroup$ You mentioned that a tutorial shows high forecasting accuracy. Please cite the tutorial. You pointed out that ML developers would be wealthy if high accuracy was possible. The fact is, practically all tutorials and papers do not report a valid time series forecasting metric! RMSE and other metrics that lose the directional accuracy of the forecast are useless for forecasting direction error. Another important fact is that LSTMs alone do not provide an accuracy suitable for forecasting stock prices for profit for long time regimes. $\endgroup$ Jun 9 at 18:21
  • $\begingroup$ Sorry for the unclear post. Actually, My data is a CPU Usage history from my lab top. This was a kind of practice work. According to my data, I found It seems no periodic situation or trend. So that is the reason why I said 'My data is totally random' but I think I misunderstood the random data such as stationary. the stock is one example to explain my question. $\endgroup$
    – orde.r
    Jun 12 at 5:15
  • $\begingroup$ Yes. Basically, I would like to predict future CPU Usage using CPU usage history as same as stock price prediction. In this step, not only 1 unit prediction a period prediction I want to do. $\endgroup$
    – orde.r
    Jun 12 at 5:24

1 Answer 1


A standard method for pre-processing time series data for neural network architectures, such as an LSTM, is to normalize the data. Good tutorials will include this step. There are several variations to normalizing time series data. Jason Brownlee writes a lot of good stuff on machine learning. Please see his article on How to Scale Data for Long Short-Term Memory Networks in Python.

Also, see the replies/answers to: https://stackoverflow.com/questions/43467597/should-i-normalize-my-features-before-throwing-them-into-rnn

The following is a tutorial on predicting stock prices, employing normalization, using an LSTM: Time-Series Forecasting: Predicting Stock Prices Using An LSTM Model

  • $\begingroup$ Thank you for your reply. It was a great helps to understand the LSTM using more reasonable data and model structure. I will carefully read the article that you recommended. $\endgroup$
    – orde.r
    Jun 12 at 5:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .