K-Means Clustering From Scratch in Python (Mathematical)

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มิ.ย. 2024
  • In this video we implement K-Means clustering from scratch. We look at the theory and the mathematics behind it and then we use NumPy to put it into code.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    💼 Services 💼
    💻 Freelancing & Tutoring: www.neuralnine.com/services
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    Timestamps:
    (0:00) Intro
    (0:17) Theory & Math Background
    (7:21) Coding K-Means From Scratch
    (32:37) Outro
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 19

  • @pitaeata8493
    @pitaeata8493 ปีที่แล้ว +4

    this is great, thank you. it feels good to understand something and be a little closer to understanding machine learning or how to use it properly.

  • @AlexandLupand
    @AlexandLupand 8 หลายเดือนก่อน

    I'm glad I found this tutorial!

  • @linusolmin9313
    @linusolmin9313 28 วันที่ผ่านมา

    Thank you very much!

  • @Hickssama
    @Hickssama 3 หลายเดือนก่อน

    Thank you sir

  • @tcgvsocg1458
    @tcgvsocg1458 ปีที่แล้ว

    really interesting

  • @SeziManuhutu
    @SeziManuhutu 4 หลายเดือนก่อน

    your explanation is great. but i want to ask, what if we want to know what data is move to different cluster. like at first the data is in 0 cluster but then after that it's move to the other group. how do we know the number of data that is move to another cluster?

  • @Larzsolice
    @Larzsolice 10 หลายเดือนก่อน +1

    I take random points from my data as initial centroids, less computations since you only need the set a random integers for indices.

    • @bibekmaharjan8969
      @bibekmaharjan8969 7 หลายเดือนก่อน

      Can you share the code for it

    • @Larzsolice
      @Larzsolice 7 หลายเดือนก่อน

      @bibekmaharjan8969 not sure how here, but the Python random package has a random.choice() or something like that. You can use the data points as the iterable and choose k of them randomly like that.

    • @bibekmaharjan8969
      @bibekmaharjan8969 7 หลายเดือนก่อน

      @@Larzsolice alright. Thanks a ton

  • @bijayamanandhar3890
    @bijayamanandhar3890 7 หลายเดือนก่อน

    It's a great tutorial. Beside everything, I just didn't understand why and how it was assumed to have 3 centroids for the example dataset where as you assumed the dataset has no label (unsupervised). Appreciate if you can elaborate. Thanks,

    • @NeuralNine
      @NeuralNine  7 หลายเดือนก่อน +2

      The number of centroids is the same as the number of clusters. You can either just pick one or you can use techniques to find the "optimal" or at least a good number of clusters. I have a video about this on my channel.

  • @Ali110.69
    @Ali110.69 4 หลายเดือนก่อน

    Hello, I had a question, I wanted to know if I want to work in machine learning or data science, I must use Anaconda and Jumper Lab or can I use Pycharm? I asked this question to many people and they said I should work in Jupyter Lab I can't get along with its environment. I can work inside pycharm or vscode. Your answer can help me a lot. Thank you

    • @user-ti6zf5mj4x
      @user-ti6zf5mj4x 3 หลายเดือนก่อน +1

      Better use VS code to have a JN architecture, and if it creates issues, you may use Pycharm!

    • @sekiro_19
      @sekiro_19 2 หลายเดือนก่อน +1

      use Jupiter notebook

  • @philtoa334
    @philtoa334 ปีที่แล้ว +1

    Thx_.

  • @user-gk5bz6vd9j
    @user-gk5bz6vd9j ปีที่แล้ว +1

    hi i am getting this error can you tell how to solve it
    ValueError: 'c' argument has 200 elements, which is inconsistent with 'x' and 'y' with size 100.

  • @aravindputtapaka5147
    @aravindputtapaka5147 ปีที่แล้ว

    I want a python code to convert handwritten image into plain text with accurate i have tried buti didnt got you can try it and show it me sir and plz respond to this comment bcz i am searching for this very curiosly...

    • @AnmolKumar-so8lh
      @AnmolKumar-so8lh 3 หลายเดือนก่อน

      use OCR(optical charcter recognation) for that using ocr you can extract text from the image