문제

I read this document: https://iamtrask.github.io/2015/11/15/anyone-can-code-lstm/ It was pretty simple, but I don't understand how to use it for predict the next sequence (for example) in trading systems.

In the above article it "loops" and returns each cycle a "bit", but if do I need only ONE output (like in trading systems)?

I suppose that I have to feed "outputs" also/only, is this right?

Thank you

도움이 되었습니까?

해결책

Absolutely yes, Vanilla RNNs can be very good predictors for time series data. You can check this detailed official TensorFlow on time series forecasting, for example.

As they said in part 1:

the model will be given the last 20 recorded temperature observations, and needs to learn to predict the temperature at the next time step

This also gives you information about how to structure your data for training. Given an input sequence of given length, predict the next n steps of the series - where n can be 1 or more. The choice is very task-specific.

Assuming you are working with univariate time series (i.e. single series with no other variables) then you can shape your X_train as:

( number of observations , length of input series , 1 )

If you are working with multivariate datasets, then change 1 with your number of explanatory variables.

At each training iteration, the model will look at input data, and the actual outcome, and try to "learn" a mapping between x and y.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 datascience.stackexchange
scroll top