Using LSTM for time series classification, all data in the training set and the test set were erroneously classified into one class

2 visualizaciones (últimos 30 días)
I wanted to use LSTM to do a two-class classification of time series, but in the end all the data was grouped into one class and my tags didn't seem to work

Respuestas (1)

Aman
Aman el 11 de Sept. de 2023
Hi ,
I understand you want to perform a classification task on the time series data using LSTM.
Misclassification into a single class can occur for many reasons, like an imbalanced dataset, insufficient training data, improper data preprocessing, and training issues like not giving enough epochs to train the model.
These issues can be resolved using data balancing, data augmentation, and proper data pre-processing techniques. Please try the following steps to diagnose the issue:
  • If in your dataset the number of samples of one class is way too many compared to the other class, then there is a data imbalance in your dataset, which can be solved either by under-sampling the majority class or by oversampling the minority class.
  • If there is less training data, then you need to perform data augmentation to increase the training sample size.
  • If the range of data among the features varies too much, you need to pre-process the data to make them in the same range to ensure equal contribution of each feature. One way to do so is by using min-max scaling.
Please refer to the following documentation to know more about performing classification on the time series data:
Hope this helps!
Regards,
Aman Mehta

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by