# Can RNN work with just one input?

We have a time series data.Is it possible to create a RNN such that there is only dimenson(or feature) in data(as shown in fig1).If yes,will it identify the pattern in time series data correctly? The confusion arises because only neuron (yellow to blue in figure 2) information is passed to the output.Is it sufficient to predict a pattern in time series data?  • Yes. Your input vector can have an arbitraty number of dimensions. Feb 1, 2019 at 8:37
• Yes It can have...but will it predict time series perfectly? Feb 1, 2019 at 9:41
• Sometimes to properly predict time-series it will need feedback input too, so it makes prediction based about previous values of time-serie and current input-values. It is especially important when handling with dynamic systems for example. Feb 1, 2019 at 10:34
• Actually my question is ,suppose we have dataframe containing just one column of values (that is there is only one input neuron). Is it sufficient to predict a time series problem?Or we require more than one column of values arranged in time series fashion? Feb 1, 2019 at 10:39
• Based on your comments this is more of a conceptual problem about time series prediction than about RNN's in general. You are asking if it is possible to predict $X_{t+1}$ based on $X_t$ for your time series. If the sequence you are trying to predict show dependence across time steps, then it will be possible to predict it to some extent using an RNN, or many other time series models. If the dependence across time is highly non-linear then an RNN could be a good model choice. I suggest you do some exploration on your time series, to get a sense for the dependence structure across different lag Mar 3, 2019 at 15:23

Yes, in this case train_x and train_y both have just 1 column. RNN learns patterns in just that variable and tries to predict next instance based on the patterns. Usually, this is just a theoretical exercise. In real world, you will have multiple features.

Some examples :

https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/

https://machinelearningmastery.com/time-series-forecasting-long-short-term-memory-network-python/

• Ok so how does it really work.Suppose we give a batch size of one...it will take the first feature vector and find the output value.Now coming to second feature vector..will it pass the value found out in the first feature vector to find the output for second? Feb 1, 2019 at 11:36
• Batch size is not 1. You will provide a set of values. Like last 300 values of X and next Value of X will be the output. Feb 1, 2019 at 11:43
• I would recommend reading on them first and then trying to code it up and then your queries will be solved :) Mar 3, 2019 at 12:34