Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Wavelet Feature Classification EKG Aritmia Deep Learning #4: Wavelet Feature Classification with Classic Machine Learning”.
Other ways we can help with Python.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

Multi-Objective Optimization Course: NSGA-II, MOPSO & Hybrid Algorithms (Python)

ECG Arrhythmia Classification Course with Wavelet & Deep Learning (PyTorch)

ANFIS + PSO/GA Course for Non-Linear Time Series Forecasting (Python)
Have it built for you
No time to learn Python? Our team can do the project for you.

Python Machine Learning — Prediction Models, Customer Segmentation, Fraud Detection & AI Apps

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, SVM and Random Forest tested on unseen patients. Random Forest achieves 91% accuracy, but almost fails to detect the S bit. SVM has lower accuracy but is more balanced across classes. Let's start. Welcome to episode four of the EKG classification series with Wavelet and Deep Learning. Classic Machine Learning with well-designed features is still very powerful for biomedical signals, especially with limited data. Today we will train SVM and Random Forest, and learn to interpret the results with the correct metrics.
Create the classic underscore classification.py file. Each bit feature consists of 15 DWT features and 4 RR features, standardized with a standard scalar fitted on DS1. We take 8000 random N bits plus all S, V, and F bits from DS1 to make training faster and more balanced. The report function calculates sensitivity, the percentage of bits of a class that are detected, and positive predictivity, the percentage of predictions of a class that are correct, two standard AAMI metrics. SVM RBF kernel and Random Forest with 300 trees use balanced class weights. Run SVM achieves an accuracy of 0.809, with sensitivity V91%, S36%, and F35%. Random Forest has higher accuracy, 0.909, but sensitivity for S is only 13% and F6%. Positive predictivity for F is very low for both, 2-3%, because F bits are very similar to normal. Proceed to the Confusion Matrix for both models.
Let's take a look at the graphs. Random Forest includes 87% of S bits into the N class, its accuracy is high because almost all bits are indeed N. SVM is bolder in guessing S and F, so more are detected, at the cost of some N bits being incorrectly classified as arrhythmia. In a clinical context, missing arrhythmia is usually more dangerous than false alarms, so accuracy alone should not be the sole measure.
Done. We have trained SVM and Random Forest on Wavelet and RR features, tested it inter-patient, and understood sensitivity and positive predictive value. In the next episode, we will train 1D and 2D CNNs. Currently working on a thesis, dissertation, or research in biomedical engineering and artificial intelligence? Cerdas Inovasi Digital helps implement biomedical signal processing, from filtering and EKG signal segmentation, Wavelet transformation, classic machine learning, up to 1D and 2D CNNs along with their interpretation, as well as opening Python programming courses for electrical and biomedical engineering. Want to master the entire series, from MITBIH base data up to class-wise arrhythmia evaluation? All 6 episodes, complete with step-by-step PDF guides data set, and source code, are available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy single class with lifetime access. Subscribe now on the premium page at cerdas inovasi digital.com. Contact our WhatsApp, or visit cerdasinovasidigital.com. Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →