- 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.
Using LSTM for time series classification, all data in the training set and the test set were erroneously classified into one class
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Aman
2023-9-11
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:
Please refer to the following documentation to know more about performing classification on the time series data:
Hope this helps!
Regards,
Aman Mehta
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!