0
$\begingroup$

I am trying to train my model using LTSM layer in Keras (python). I have some problems regarding the data representation and feeding it into the model.

My data is 184 XY coodinates encoded as a numpy array with two dimensions: one corresponding to the X or Y and second is every single point of X or Y. Shape of a single spectrum is (2, 70). Altogether, my data has a dimension of (184, 2, 70).

The label set is an array of 8 elements which describes the percentage distribution of some 8 features which are describing XY. The shape of an output is (184, 8).

My question is how can I train using the time series for each XY pair and compare it to the corresponding label set? Different XY data show similar features to each other that is why it is important to use all 184 sample for the training. What would be the best approach to handle this problem? Below I show the schematics of my data and model:

Input: (184, 2, 70) (number of XY, X / Y, points)

Output: (184, 8) (number of XY, predictions)

I look forward for some ideas!

Data representation

$\endgroup$
0
$\begingroup$

I didn't understand your question, 184 is the length of the sequence or the size of the data set? if 184 is the data set size, then I think 70 is the sequence length, then you can use LSTM. But LSTM will out put 70 hidden states, and use the last hidden state as the output.

$\endgroup$
  • $\begingroup$ Thanks for the comment! Sorry for the poor explanation. I have 184 different spectra with XY coordinates (updated post with image). Each X and Y has 70 points. The data is described as the label with 8 numbers. 184 separate files is not many for training I believe so I was thinking about splitting each XY data to time series with size of 5 and using LTSM for training. $\endgroup$ – Dawid Aug 5 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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