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 Quality Power Disturbance Classification #5: Classification with SVM, Random Forest, and XGBoost”.
Other ways we can help with Python.
Learn with a mentor
Scheduled Simulation & Engineering courses with live guidance and a certificate.

Course/Training Ansys ~ Heat Transfer and Heat Flux Analysis
★ 5.0 (10)

Course/Training MATLAB — MATLAB App Design: The Ultimate Guide to MATLAB Apps
★ 5.0 (10)

Course/Training Ansys — Airflow Simulation of a Car Radiator with ANSYS
★ 5.0 (9)
Have it built for you
No time to learn Python? Our team can do the project for you.

Matlab Development Service — Complete Neural Signal Processing and Analysis Zero to Hero
★ 5.0 (59)

Ansys Maxwell Development Service
★ 5.0 (50)

Petrel Development Service
★ 5.0 (14)
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, three machine learning algorithms recognize nine types of power quality disturbances from the Wayflat features, with test accuracy up to 99.1 percent. The Confusion Matrix shows the only class that is still often confused. Let's start. Hello, welcome to episode five of the power quality disturbance classification series with Wayflat. The features are ready, now it's time for machine learning. We are comparing three algorithms that are most commonly found in papers, Support Vector Machine, Random Forest, and XGBoost. Create a classification .py file.
The build_model function prepares the three models. SVM with an RBF kernel requires features to be scaled the same, so it is combined with a Standard Scalar in one pipeline. Random Forest uses 300 decision trees whose results are voted. XGBoost builds 300 trees step by step, each tree improves the errors of the previous tree. This function is also used in the final episode.
The main part splits the data into 70 percent training and 30 percent testing stratified, then trains and tests all three models. Run. SVM achieves an accuracy of 97.8 percent, Random Forest 99.0, and XGBoost 99.1 percent. All are trained in seconds. The most common error of the best model is NOC being mistaken for normal, 5 signals, because shallow NOC is very similar to pure sine.
Let's look at the XGBoost Confusion Matrix. Rows are the actual classes and columns are the predicted classes. Almost all values are on the diagonal. The remaining errors are physically reasonable, Shallow NOC with normal, short interruption with sec, and the harmonic class with small SAG and harmonics.
Done. We have already trained the SVM, Random Forest, and XGBoost, reaching an accuracy of about 99 percent, and analyze its errors using the Confusion Matrix. But this signal is still clean. In the final episode, we test its robustness against NICE. Working on a thesis, thesis, Or are you involved in research in the field of electrical power quality and signal processing? Cerdas Inovasi Digital helps with the implementation of machine learning, from the generation of disturbance signals according to IEEE-159, wavelet transform, feature extraction, until classification with SVM, Random Forest, and XGBoost, as well as opening a Python programming course for electrical engineering. Want to master the entire series, From synthetic signals to NICE robustness testing? All 6 episodes, complete with PDF step-by-step guides and source code, are available to 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 a single class only? Buy the single class with lifetime access. Subscribe now on the premium page cerdasinovasidigital.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 →