lstm network not giving accurate results
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have trained an LSTM network for fault classification of transmission lines. I have collected the current samples of three phases using Simulink and processed using wavelet transform. The total number of fault cases are 161 for each fault and number of features in each simulation are 104. After training the LSTM network I have plotted the confusion matrix with the data I trained the network and the data is not classified exactly.I have converted the data into cell format. I used the following code to implement LSTM.
inputSize = 104;
numHiddenUnits1 = 100;
numHiddenUnits2 = 100;
numClasses = 10;
% layers = [ ...
% sequenceInputLayer(inputSize)
% lstmLayer(numHiddenUnits1,'OutputMode','sequence')
% dropoutLayer(0.2)
% lstmLayer(numHiddenUnits2,'OutputMode','last')
% dropoutLayer(0.2)
% fullyConnectedLayer(numClasses)
% softmaxLayer
% classificationLayer];
% options = trainingOptions('sgdm', ...
% 'MaxEpochs',100, ...
% 'Verbose',false, ...
% 'Plots','training-progress');
net = trainNetwork(XTrain1,YTrain1,layers,options);`
0 commentaires
Réponses (1)
Krishna
le 7 Fév 2024
Hello Suresh,
Upon reviewing the confusion matrix, it appears that your network may be overfitting, particularly with respect to class 1. I recommend verifying that the data you have compiled is mostly evenly distributed among all classes. To mitigate overfitting in neural networks, you might find the following article useful:
Another potential issue could be an insufficient quantity of data. Recurrent networks typically require a substantial amount of data for effective learning. I also noticed that you are employing a dropout layer. Consider increasing the dropout rate to see if it enhances the performance metrics for your test dataset. Furthermore, I notice you are not using validaion dataset. Make sure to utilize both a validation dataset and a test dataset to accurately assess the efficacy of your training. Apart from that try hyperparameter tuning of variables to check if that could help your problem. Please go through this documentation to learn more,
https://towardsdatascience.com/simple-guide-to-hyperparameter-tuning-in-neural-networks-3fe03dad8594
Hope this helps.
0 commentaires
Voir également
Catégories
En savoir plus sur AI for Signals and Images dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!