Is there any way of using machine learning for successive image comparison to a template?
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am using MATLAB R2020a on a MacOS. I am currently trying to detect abnormal phase-space trajectories in the 2D space on a cycle-by-cycle basis as part of an ECG signal. Is there any way of training an algorithm with 'normal' trajectories within that signal and then using this ground truth as a template against which to compare the trajectory associated with each new cycle to find and flag abnormal cycles? Within the signal, there would be mostly normal cycles with intermittent periods of abnormality.
Below is an example of what would constitute a 'normal' trajectory:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/463300/image.png)
This is an example of an abnormal cycle, but abnormal trajectories have variable morphologies:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/463305/image.png)
Please note though, that the comparison would not be against a fixed 'normal' template, but rather a normalised template for a particular individual's signal.
Any suggestions would be very much appreciated. Thanks in advance
2 个评论
Matt Gaidica
2020-12-17
Are the abnormalities time-invariant? I.e. if heart rate doubled, but the voltages followed the same trajectories, should it be deemed 'normal'?
回答(2 个)
Aditya Patil
2020-12-21
编辑:Aditya Patil
2020-12-21
As per my understanding, you have some ECG data that can be classified as normal or abnormal, and you want to train a machine learning model that classfies it as such.
While it should be possible to train a model to do the classification on the images as shown in the picture, I would recommend using the ECG signals themselves, as you are losing information when converting from data to images.
If the data is then time dependent or sequential, you could use an LSTM model as shown in the Classify ECG Signals Using Long Short-Term Memory Networks example.
If the data instead is not time dependent or sequential, then consider extracting features and training a Neural network model on it.
4 个评论
Aditya Patil
2021-1-4
Currently, sequence input layer does not support multiple inputs. This is a known issue and it might be fixed in any of the upcoming releases. A workaround is to create an Nx2 array. I cannot comment on appropriate feature extraction technique for ECG, hence I recommend you to ask a separate question regarding preprocessing ECG data, as that would attract more attention.
Image Analyst
2021-1-4
编辑:Image Analyst
2021-1-4
A simple classifier that might work is to take your signal and compute the centroid.
meanX = mean(x);
meanY = mean(y);
Then compute the slope or angle of all the point from the centroid. Then take the histogram of those.
slopes = (y - meanY) ./ (x - meanX);
histogram(slopes);
grid on;
xlabel('Slope');
ylabel('Count');
A normal signal would have just 3 angles (3 humps in the histogram) while an abnormal one would have a histogram with all kinds of different angles (lots of humps, or no humps or discernible shape).
Attach your (x,y) data if you need help with this approach.
3 个评论
Image Analyst
2021-1-5
Which mat file is the normal one and which is the abnormal one? Please make it easy for me : Give me code to read in the mat files into x and y variables and plot them. I'll check back tomorrow for it. No time today.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AI for Signals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!