qlstm icon indicating copy to clipboard operation
qlstm copied to clipboard

Using the qlstm for time-series prediction

Open artaasd95 opened this issue 1 year ago • 3 comments

Hi, Thanks for your precious work, I want to know due to the use of sigmoid and other activation functions, is it possible the qlstm for time-series prediction? Or the activation functions(in the core or QLSTM from QLSTM_pennylane file) should be changed? Can you please explain? And I want to change the activation functions in the LSTMTagger class can be deleted? I appreciate your answer in advance.

artaasd95 avatar Jul 19 '22 08:07 artaasd95

@artadp were you able use it for ts predictions? if so do you mind sharing code? @[email protected]

doradocrux avatar Aug 01 '22 01:08 doradocrux

@doradocrux I have executed the code for prediction, unfortunately the time of the training was very inefficient and high, so I deleted the code. Also, I did not have so much changes. I can send you the model but I do not think this is going to work, do you need it?

artaasd95 avatar Aug 05 '22 16:08 artaasd95

Hi,

sorry for the late reply. I don't see why it shouldn't work with time series, but I haven't tried. I suppose you are going to feed it with windows of the time series, trying to predict the next element. However, the input of this network is a sequence of tokenized sentences, you need to change the part that handles the inputs.

As for the activation functions, you are free to experiment of course, but I think they are the standard of the way a LSTM works. A sigmoid squashes the output between 0 and 1, while tanh between -1 and 1. The sigmoid decides whether a component of the LSTM is relevant or not to predict the output.

rdisipio avatar Aug 22 '22 15:08 rdisipio