0
$\begingroup$

I have a labelled dataset (0 and 1) with two types of short length time series data (from day1-day5) as follows.

Type1 (Temperature at location1):

sensor1, 38, 38, 35, 33, 32
sensor2, 33, 32, 35, 36, 32
and so on ....

Type2 (Temperature at location2):

sensor1, 18, 18, 12, 11, 09
sensor2, 13, 12, 15, 16, 12
and so on ....

In summary my dataset looks as follows.

ID, time-series1, time-series2, label
sensor1, [38, 38, 35, 33, 32], [18, 18, 12, 11, 09], 0
sensor2, [33, 32, 35, 36, 32], [13, 12, 15, 16, 12], 1
and so on ....

I would like to use my dataset in LSTM (or a equivalent deep learning model).

However, I am still not clear how I can use my dataset in a deep learning model such as LSTM.

I am happy to provide more details if needed.

$\endgroup$
3
  • 1
    $\begingroup$ Are you sure you want an autoencoder if you have labels? Do you not want to predict the label? $\endgroup$
    – timchap
    Commented Jul 16, 2019 at 9:03
  • 1
    $\begingroup$ The goal of an autoencoder is to learn how to "compress" (encode) some data to some latent representation and subsequently reproduce the original data (decode) from that compressed form. An LSTM autoencoder applies this technique to sequence data. You probably want an "LSTM classifier" (try searching this term instead), whose goal typically is: given a sequence, predict the target value. I think that is closer to what you what you are looking for. $\endgroup$
    – timchap
    Commented Jul 16, 2019 at 10:48
  • 1
    $\begingroup$ @timchap thank you. I have edited the question accordingly. I will search in google too. thank you :) $\endgroup$
    – EmJ
    Commented Jul 16, 2019 at 11:42

1 Answer 1

1
$\begingroup$

RNN input data must follow this pattern:

( Number of observations , Number of input series , Window size )

Keep the number of observations to None when you define the LSTM input_shape. The number of input series in this case is 2, since you are using two time series to make predictions. Window size is the length of your time series row. Your input shape would then be:

input_shape = (2, window_size)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.