Expanding Deep Network Architecture for Signal Classification
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have implemented a code for classifying P, QRS, T, and NA segments from ECG signals. The current network architecture consists of a sequence input layer, an LSTM layer, and fully connected layers for classification. However, I would like to enhance the performance of the network by incorporating convolutional neural network (CNN) layers to capture more informative features from the ECG signals.
Here is the existing code that I have:
input_data = fsstTrainData(:, 1);
target_data = fsstTrainData(:, 2);
size_input = size(input_data); %cell 315*1
size_input_signals = size(input_data{1, 1}); %double 40*5000
size_target = size(target_data); %cell 315*1
size_target_signals = size(target_data{1, 1}); %categorical 1*5000
layers = [
sequenceInputLayer(size_input_signals(1))
lstmLayer(200, 'OutputMode', 'sequence')
fullyConnectedLayer(class_num)
softmaxLayer
classificationLayer];
trainNetwork(input_data, target_data, layers, options);
I would appreciate any assistance in modifying the network architecture to incorporate CNN layers that can extract more informative features from the signals. Your suggestions and guidance would be highly valuable in improving the classification accuracy.
Thank you for your help!
0 comentarios
Respuestas (2)
Aniketh
el 9 de Jul. de 2023
Editada: Aniketh
el 9 de Jul. de 2023
In order to answer your question how you can incorporate CNN layers to your architecture it is quite straight forward, here is one short example to give you an idea:
cnn_layers = [
imageInputLayer([size_input_signals(1), size_input_signals(2), 1])
convolution2dLayer([3, 3], 16, 'Padding', 'same')
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
convolution2dLayer([3, 3], 32, 'Padding', 'same')
reluLayer
maxPooling2dLayer(2, 'Stride', 2)
];
lstm_layers = [
sequenceInputLayer(size_input_signals(1))
lstmLayer(200, 'OutputMode', 'sequence')
fullyConnectedLayer(class_num)
softmaxLayer
classificationLayer
];
layers = [
cnn_layers
sequenceFoldingLayer('Name', 'fold')
lstm_layers
];
As for increasing the accuracy/enhancing the performance, you should know these are really empirical methods, just adding more layers or introducing more complex architectures such as this would not necessarily produce better results and might even produce worse results.
Try and experiment on your own, changing the parameters and different architectural changes see what works best for your case, I would suggest reading up on how DL architectures are popularly used for processing ECG Signals, I believe MathWorks has a lot of resources on this as well.
Hope this helped!
0 comentarios
Abolfazl Nejatian
el 10 de Jul. de 2023
2 comentarios
Aniketh
el 10 de Jul. de 2023
Apologies for the confusion, as I mentioned it was just an example to get you started, the dimensions would not match in the template I gave, having a look at it, the dimensions should be 1/4th the original dimension passed to the CNN, but further in the code you would have to be mindful and check carefully for dimensions.
Ver también
Categorías
Más información sobre AI for Signals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!