How to classify "unknown" data using an LSTM
2 views (last 30 days)
Show older comments
Hello,
I have created a deep learning model to classify activities, it classifes known (labelled) activites well, however when i attempt to classify new data the trained model has not seen beofre i want it to classify it as 'unknow'. Is there a method that can do this? The problem i have is that the number of possible classes is infinate and i am oinly intreasted in the main classes.
I have tried using the confidence scores to say, if confidence score mean is <= xx for all know activites then classify as "unknow", however with little sucess. Are there any other methods i could try?
Thanks!
0 Comments
Answers (1)
Srivardhan Gadila
on 12 Jun 2021
One possible approach is to define the network for number of classes = number of known labels (main classes) + 1(for unknown labels) and assign the the unknown class to the data you are not interested and train the network. The downside here is that with more training data the training time will be more. Also if the new dataset is unbalanced then you can make use of the ClassWeights argument of the classificationLayer ( You can refer to the following similar workflow "Balance Classes Using Class Weighting" for addressing the class balancing problem.)
0 Comments
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!