How to implement K-Means from scratch with Python
HTML-код
- Опубликовано: 5 фев 2025
- In the 10th lesson of the Machine Learning from Scratch course, we will learn how to implement the K-Means algorithm.
You can find the code here: github.com/Ass...
Previous lesson: • How to implement SVM (...
First lesson: • How to implement KNN f...
Welcome to the Machine Learning from Scratch course by AssemblyAI.
Thanks to libraries like Scikit-learn we can use most ML algorithms with a couple of lines of code. But knowing how these algorithms work inside is very important. Implementing them hands-on is a great way to achieve this.
And mostly, they are easier than you’d think to implement.
In this course, we will learn how to implement these 10 algorithms.
We will quickly go through how the algorithms work and then implement them in Python using the help of NumPy.
▬▬▬▬▬▬▬▬▬▬▬▬ CONNECT ▬▬▬▬▬▬▬▬▬▬▬▬
🖥️ Website: www.assemblyai...
🐦 Twitter: / assemblyai
🦾 Discord: / discord
▶️ Subscribe: www.youtube.co...
🔥 We're hiring! Check our open roles: www.assemblyai...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#MachineLearning #DeepLearning
this one was well done!
Hope you guys do gaussian mixture models (similar algorithm) next! That's part of my thesis work and i could use the help haha
Excellent! as usual.
I enjoy all your videos,just a doubt why don't you use numpy broadcasting instead of using so many for loops to compute values such as the closest index and stuff......It would reduce the runtime of your code.
Good idea!
Hi, great videos!! Just wondering, why defining euclidian distance outside of the class? This was also done in KNN video. All the best!
this is to avoid scope of variable issues usually. here I think its just a convention.
Good stuff, but pretty hard to comprehend fully at first
I need fcm clustering and IFCM clustering can you help me?
Waiting of your response
Hi. what IDE are you using?
I think it is VIsual Studio Code
What is the difference between using fit and predict?
the fit method is used to prepare the model by telling what to expect (the shape, size of data, amount of classes, if applicable etc)
then the predict methods actually predicts form the given input
Nice.