Machine Learning Course - Lesson 12: Elongation Feature

  Рет қаралды 1,759

Radu Mariescu-Istodor

Radu Mariescu-Istodor

Күн бұрын

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: • Machine Learning Course
💻 Code
github.com/gniziemazity/ml-co...
✔️ Use P3 to follow along
✔️ P4 is the code after this lesson
💻Ilya's code: gist.github.com/id-ilych/8630...
Interpolation Video:
• Linear Interpolation (...
Euclidean Distance Video:
• Euclidean Distance: Ma...
⭐️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

Пікірлер: 27
@thefuntech2810
@thefuntech2810 10 ай бұрын
He is a Genius
@Radu
@Radu 10 ай бұрын
Not really, just a lot of practice :-)
@pesterenan
@pesterenan 10 ай бұрын
My god, I just began to watch and I'm already impressed at that convex hull algorithym!!! How people think of those things?! Hahah great work Ilya!
@Radu
@Radu 10 ай бұрын
Many more advanced algorithms are abstract, like that. It becomes easier to come up with abstract things if you are familiar with abstract things to begin with. So, studying and learning different approaches helps.
@roomanhaider
@roomanhaider 10 ай бұрын
sir you are the best teacher in the world i love you
@Radu
@Radu 10 ай бұрын
I'm glad you like the content!
@javifontalva7752
@javifontalva7752 10 ай бұрын
I am speechless. 😮
@Radu
@Radu 10 ай бұрын
How so? :-)
@yehbruh667
@yehbruh667 10 ай бұрын
Always eager to know more about ML from you❤
@Radu
@Radu 10 ай бұрын
More to come!
@yassinabdelmahdi2008
@yassinabdelmahdi2008 10 ай бұрын
Thank you for this great content
@Radu
@Radu 10 ай бұрын
Glad you enjoy it!
@yassinabdelmahdi2008
@yassinabdelmahdi2008 10 ай бұрын
we are waiting for the next video
@Radu
@Radu 10 ай бұрын
Cool! Coming out next Monday.
@AZHARakaGoat
@AZHARakaGoat 10 ай бұрын
Can u explain the coincident box and minboxbounding functions I don't understand these
@Radu
@Radu 10 ай бұрын
The idea is that the minimum bounding box (sallest area) must contain one of the edges of the convex hull, so the minimumBoundingBox tries all possible edges one by one and keeps the one with the minimum area (tightest fit). To do that, it uses the coincidentBox function which does basic vector operations (they are defined at the top: diff, dot, len, etc... they are the same as in my video on Vectors). It then rotates each point of the convex hull along the segment of interest (i, j) and outputs the oriented bounding box. Hope this helps :-)
@AZHARakaGoat
@AZHARakaGoat 10 ай бұрын
@Radu Doest it rotate each point of hull to same as angle of interest iand j, but I don't understood what baseX baseY n and v variables are what's it's main purposes are how and why is it calculated and why r we multiplying the baseX to left and adds it to origin Now I understand the minimum bounding box function but coincident function except last lines look scary 😨
@Radu
@Radu 10 ай бұрын
@@AZHARakaGoat baseX is the direction I color in red when I give examples of the oriented bounding boxes in the beginning animation. baseY is perpendicular to that. Imagine an XY cartesian space where X is along baseX and Y is just at 90 degrees. n is as the difference vector relative to the origin and v is the position in the new XY space constructed with respect to baseX and baseY. It's just linear algebra, maybe you should study it more :-) look for the linear algebra course from 3blue1brown. I remember it's pretty good!
@AZHARakaGoat
@AZHARakaGoat 10 ай бұрын
@@Radu I will learn it is this the course kzbin.info/aero/PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab
@Radu
@Radu 10 ай бұрын
yes
@yassinabdelmahdi2008
@yassinabdelmahdi2008 10 ай бұрын
Roundness will help to increase the accuracy?
@Radu
@Radu 10 ай бұрын
It will. But it's important to understand why it works, what we accomplish by using it. And what other features could be used as well.
@AZHARakaGoat
@AZHARakaGoat 10 ай бұрын
WoW 👌 Good video But iam confused did we used 3rd dim in confusion matrix 🤔 Also I didn't understood the graham algo Can u explain how did we calculated orientation and angle And is it the correct implemented. Lowest point func function lowest(p){ const r = p.reduce((a,c) => (c[1] > a[1] || (c[1] == a[1] && c[0] < a[1])) ? c : a,[0,0]) log(r) }
@Radu
@Radu 10 ай бұрын
We did use the 3rd dimension. The confusion matrix at 13:00 uses 2 dimensions. The one 4 seconds later uses 3. I don't think I can do a good job explaining new things (orientation and angle) in the comments. But I'm sure you can find resources on those online. (btw, my two videos on vectors and trigonometry teach some things about angles, but not about the orientation, if I remember right... or maybe I do mention the dot product... sorry, can't remember right now :-)) About your code, I think it's OK. It also keeps the left-most element in case several points have the same [1] value.
@AZHARakaGoat
@AZHARakaGoat 10 ай бұрын
@@Radu OK 👍
@rodrigueban9562
@rodrigueban9562 10 ай бұрын
hey Radu do you have a course where you teach novice like me???
@Radu
@Radu 10 ай бұрын
I think the most beginner-friendly content I have is the html canvas course and the math and code fundamentals playlist.
Machine Learning Course - Lesson 13: Roundness Feature
20:34
Radu Mariescu-Istodor
Рет қаралды 1,5 М.
Understanding AI - Lesson 1 / 15: A Simple Neural Network
32:09
Radu Mariescu-Istodor
Рет қаралды 16 М.
Surprise Gifts #couplegoals
00:21
Jay & Sharon
Рет қаралды 31 МЛН
FOUND MONEY 😱 #shorts
00:31
dednahype
Рет қаралды 2,6 МЛН
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 919 М.
⭐🏆⭐PRIZES: Racing AI Competition⭐🏆⭐ DEADLINE: May 15ᵗʰ 2024
1:57
Camera Input for Racing Game in JavaScript [Understanding AI - Lesson 14 / 15]
28:19
Understanding AI - Lesson 3 / 15: Multilabel Neural Networks
42:17
Radu Mariescu-Istodor
Рет қаралды 3,2 М.
How good is the latest version of ChatGPT? | BBC News
23:16
BBC News
Рет қаралды 49 М.
Using Dijkstra's Shortest Path With AI [Understanding AI - Lesson 7 / 15]
20:44
Radu Mariescu-Istodor
Рет қаралды 1,6 М.
Why Snatch Blocks are AWESOME (How Pulleys Work)  - Smarter Every Day 228
16:31
Understanding AI - Lesson 2 / 15: Hidden Layers
42:50
Radu Mariescu-Istodor
Рет қаралды 4,2 М.
Surprise Gifts #couplegoals
00:21
Jay & Sharon
Рет қаралды 31 МЛН