AI Stack Exchange
2023-02-24 17:36 UTC
By Krusty the Clown
AI-110-20230224-social-media-4ac29790
Many To One LSTM - Can I Use the Same Sequence as Input from Previous Timesteps?
I'm new to LSTMs, and I'm trying to do a basic timeseries prediction using stock prices. However, I'm a bit confused as to how the LSTM is supposed to remember outputs from previous timesteps when it has a many to one shape. For example, let's say we're at timestep n , and the following timeseries is part of my input: [[100, 10], [300, 30], [200, 20]] And it maps to some output, let's say 1 Great. But let's say at timestep n - 1 , when the input was just [[100, 10], [300, 30]] , the output was 0 . How will the LSTM know this? Should I include the same data at different timesteps (using something like zero padding) with the corresponding output? Or am I totally misunderstanding something about how LSTMs work?
I'm new to LSTMs, and I'm trying to do a basic timeseries prediction using stock prices. However, I'm a bit confused as to how the LSTM is supposed to remember outputs from previous timesteps when it has a many to one shape. For example, let's say we're at timestep n , and the following timeseries is part of my input: [[100, 10], [300, 30], [200, 20]] And it maps to some output, let's say 1 Great. But let's say at timestep n - 1 , when the input was just [[100, 10], [300, 30]] , the output was 0 . How will the LSTM know this? Should I include the same data at different timesteps (using something like zero padding) with the corresponding output? Or am I totally misunderstanding something about how LSTMs work?
Full article content could not be extracted automatically. Read the original below.
Source:
AI Stack Exchange
· ai.stackexchange.com