TransWikia.com

Why LSTM models do not require labels for each step?

Data Science Asked on June 18, 2021

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?

2 Answers

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:

  1. http://www.statsoft.com/Textbook/Time-Series-Analysis

Answered by DataFramed on June 18, 2021

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.

Answered by Bram Vanroy on June 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP