# Time Series Forecasting with Neural Network (mixed data types)

I have a dataset with the following format:

TimeStamp  | Action  | UserId
2015-02-05 | Action1 | XXX
2015-02-06 | Action2 | YYY
2015-02-07 | Action2 | XXX
...


I try to forecast future Actions for specific users based on the Users history in the dataset. I started with ntstool in MATLAB, but it can't handle mixed data types or non-numerical values. Now I am looking for other methods to predict future Actions and find periodic patterns in the records.

Is it possible to convert the values for Actions to numeric values or is there a possibility to create a neural network with mixed datatypes on the input? Maybe in R?

• Is there a fixed amount of Action types? May 25, 2016 at 8:36
• Yes, there are about 10 different Actions May 25, 2016 at 8:57
• Then one-hot encoding your actions is likely the best way to go, one column for every action type and it's a 1 if it is that action and a 0 if it's not that action May 25, 2016 at 8:59
• Thank you for the input, I will try it out! One more question: will this also work if there are more different Actions (>50)? May 25, 2016 at 9:15
• That mostly depends on the size of your dataset, since you will have much more features. This is not a problem if you have enough data May 25, 2016 at 9:16

You can convert categorical data into vectors using embedding layer before the neural network input layer. You can check this about how to use mixed data for Neural Networks. Check how LSTM, RNN networks consume text input as time-series of word vectors. Word-vectors are computed for each word at the embedding layer whose dimensionality you can control by defining the embedding layer.