Why LSTM models do not require labels for each step?
Why LSTM models do not require labels for each step?
Loading saved threads...
nolwww · External communityPost link
External question — Data Science Stack Exchange
Author: nolwww
Original post: https://datascience.stackexchange.com/questions/52384
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
For time related problems like, for example, stock prediction:
Let's say we have 300 days of data, 10 features, and one target: the price.
Why, for the training, we only need the price of the 300th day?
I know this is the way LSTM models work, but wouldn't it be useful to take into account the price of the 299 other days for the model?
Quote
Report
DataFramed · External communityPost link
External answer — Data Science Stack Exchange
Author: DataFramed
Original post: https://datascience.stackexchange.com/a/52389
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Time-series analysis has two main goals:
To identifying the nature of the phenomenon represented by the sequence of observations, and
To forecast (predicting future values in time for a variable).
NOTE: In this respect, models try to get pattern using historical values. Do not confuse here between forecasting (predicting future values) and prediction.
For time-series prediction(forecasting) problems,
the models ( ARIMA, LSTM) try to extract trend, seasonality, and residual from the list of historical values
e.g. price from 300 historical dates or time. Therefore, there is no need to look for dependent variables here.
We must be clear,
the time series forecasting algorithm extrapolate historical trend to near and far future.
They do not predict target variable based on dependent variables.
This is the main reason you will see time-series models only work with single variable who's historical data-points become input and future data points become target.
Reference:
http://www.statsoft.com/Textbook/Time-Series-Analysis
Quote
Report
Bram Vanroy · External communityPost link
External answer — Data Science Stack Exchange
Author: Bram Vanroy
Original post: https://datascience.stackexchange.com/a/52390
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
It seems that you are confused about what the difference between a feature and a label is.
Your label is the 'gold' outcome that you are trying to predict. In stock prediction, this is often a single number, i.e. some form of regression. For a given time series you are trying to predict the price at a future point in time.
What you are suggesting is very well possible, and basically how (linear) regression works: given 300 data points, make a function that fits the data. Then get the value from the function from a given
x
. LSTMs and other architectures are of course more complex, but the idea is similar.
You could, for instance, feed the prices of each time stamp as a feature to the LSTM. It should be a powerful predictor. The neural network will try to figure out which features are important at what stage in time.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Data Science Stack Exchange Author: DataFramed Source score (net votes, not local likes): 0 Original post: https://datascience.stackexchange.com/a/52389 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Time-series analysis has two main goals: To identifying the nature of the phenomenon represented by the sequence of observations, and To forecast (predicting future values in time for a variable). NOTE: In this respect, models try to get pattern using historical values. Do not confuse here between forecasting (predicting future values) and prediction. For time-series prediction(forecasting) problems, the models ( ARIMA, LSTM) try to extract trend, seasonality, and residual from the list of historical values e.g. price from 300 historical dates or time. Therefore, there is no need to look for dependent variables here. We must be clear, the time series forecasting algorithm extrapolate historical trend to near and far future. They do not predict target variable based on dependent variables. This is the main reason you will see time-series models only work with single variable who's historical data-points become input and future data points become target. Reference: http://www.statsoft.com/Textbook/Time-Series-Analysis
Checking account access…