Uploaded July 2023 | Updated September 2026, 2 weeks ago
To improve the accuracy of our machine learning classifier, we'll implement another feature where we measure how elongated a shape is. We do this by first computing the convex hull, then finding which oriented bounding box has the smallest area and finally dividing it's width (the longest side) to the height (the shortest side). Then, we add this feature to create a 3 dimensional feature vector and use the KNN classifier using the Euclidean distance.
The Course: youtube.com/playlist?list=PLB0Tybl0UNfYe9aJXfWw-Dw_4VnFrqRC4
💻 Code
github.com/gniziemazity/ml-course-phase-2
✔️ Use P3 to follow along
✔️ P4 is the code after this lesson
💻Ilya's code: gist.github.com/id-ilych/8630fb273e5c5a0b64ca1dc080d68b63
Interpolation Video:
youtu.be/J_puRs40GhM
Euclidean Distance Video:
youtu.be/3rPwfmrCwVw
⭐️TIMESTAMPS⭐️
00:00 Course Introduction
02:05 Reviewing Ilya's Code
04:54 Debugging the Code
08:25 Elongation Feature
11:00 Euclidean Distance
16:08 Analysis and Discussion
To improve the accuracy of our machine learning classifier, we'll implement another feature where we measure how elongated a shape is. We do this by first computing the convex hull, then finding which oriented bounding box has the smallest area and finally dividing it's width (the longest side) to the height (the shortest side). Then, we add this feature to create a 3 dimensional feature vector and use the KNN classifier using the Euclidean distance.
The Course: youtube.com/playlist?list=PLB0Tybl0UNfYe9aJXfWw-Dw_4VnFrqRC4
💻 Code
github.com/gniziemazity/ml-course-phase-2
✔️ Use P3 to follow along
✔️ P4 is the code after this lesson
💻Ilya's code: gist.github.com/id-ilych/8630fb273e5c5a0b64ca1dc080d68b63
Interpolation Video:
youtu.be/J_puRs40GhM
Euclidean Distance Video:
youtu.be/3rPwfmrCwVw
⭐️TIMESTAMPS⭐️
00:00 Course Introduction
02:05 Reviewing Ilya's Code
04:54 Debugging the Code
08:25 Elongation Feature
11:00 Euclidean Distance
16:08 Analysis and Discussion










