StatQuest: K-nearest neighbors, Clearly Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • Machine learning and Data Mining sure sound like complicated things, but that isn't always the case. Here we talk about the surprisingly simple and surprisingly effective K-nearest neighbors algorithm.
    For a complete index of all the StatQuest videos, check out:
    statquest.org/video-index/
    If you'd like to support StatQuest, please consider...
    Buying The StatQuest Illustrated Guide to Machine Learning!!!
    PDF - statquest.gumroad.com/l/wvtmc
    Paperback - www.amazon.com/dp/B09ZCKR4H6
    Kindle eBook - www.amazon.com/dp/B09ZG79HXC
    Patreon: / statquest
    ...or...
    TH-cam Membership: / @statquest
    ...a cool StatQuest t-shirt or sweatshirt:
    shop.spreadshirt.com/statques...
    ...buying one or two of my songs (or go large and get a whole album!)
    joshuastarmer.bandcamp.com/
    ...or just donating to StatQuest!
    www.paypal.me/statquest
    Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
    / joshuastarmer
    0:00 Awesome song and introduction
    0:21 K-NN overview
    0:44 K-NN applied to scatterplot data
    2:44 K-NN applied to a heatmap
    4:12 Thoughts on how to pick 'K'
    #statquest #KNN #ML

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

  • @statquest
    @statquest  2 ปีที่แล้ว +8

    Support StatQuest by buying my book The StatQuest Illustrated Guide to Machine Learning or a Study Guide or Merch!!! statquest.org/statquest-store/

  • @thinkalinkle
    @thinkalinkle 5 ปีที่แล้ว +159

    I'm taking a machine learning course at university, and I've been blessed with having found your channel. Keep up the great content!

    • @statquest
      @statquest  5 ปีที่แล้ว +10

      Hooray! I'm glad the videos are helpful. :)

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

    Whenever I search for a video tutorial, and you pop up in the search results, my heart fills with joy!!! ^^
    Thank you once again!

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

      Hooray!!!!! :)

    • @siddheshbalsaraf1776
      @siddheshbalsaraf1776 3 ปีที่แล้ว

      same here ..not started the video yet but only 1 video on knn .....dont know if i can understand very very well like linear regression

  • @raytang1867
    @raytang1867 5 ปีที่แล้ว +477

    Five minutes explains better than some teachers spent one hour. :)

    • @statquest
      @statquest  5 ปีที่แล้ว +6

      Thank you! :)

    • @free_thinker4958
      @free_thinker4958 3 ปีที่แล้ว +19

      Better than teacher spending semester for me

    • @TeacherMarcus1010
      @TeacherMarcus1010 3 ปีที่แล้ว

      hahahahaha

    • @spano1723
      @spano1723 2 ปีที่แล้ว +3

      @@free_thinker4958 wtf really? also my teacher took 5 minutes that's why I understood nothing

    • @NerdByFate
      @NerdByFate 2 ปีที่แล้ว +3

      For real, this channel is a godsend.

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

    INTRO IS LEGENDARY BRO : )

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

      Yup, that's a good one. :)

  • @rahulsadanandan5076
    @rahulsadanandan5076 3 ปีที่แล้ว +25

    Every time I see your videos I'm simply amazed how you manage to make things simple,it's like 1+1=2, respect

    • @statquest
      @statquest  3 ปีที่แล้ว +2

      Thank you! :)

  • @ycao6
    @ycao6 5 ปีที่แล้ว +10

    it is good to listen to your music in your website after watching this clear-explained video. thanks a lot.

    • @statquest
      @statquest  5 ปีที่แล้ว

      Thank you so much! :)

  • @spacemeter3001
    @spacemeter3001 3 ปีที่แล้ว +13

    When a random TH-cam channel explains it better than your University Professor....
    Keep it up!

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

      Wow, thanks!

  • @ayush612
    @ayush612 6 ปีที่แล้ว +6

    This is by far the best video on KNN algo ! Thanks Josh

    • @ayush612
      @ayush612 6 ปีที่แล้ว

      You are doing awesome work Sir..have watched your other videos as well..very intuitive and logically explained

  • @lucarauchenberger628
    @lucarauchenberger628 2 ปีที่แล้ว +2

    I can't believe how good you are at explaining this. wow!!!

  • @Oliver-nt8pw
    @Oliver-nt8pw 5 ปีที่แล้ว +6

    Thank you, very clear and to the point explanation !

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

    This channel is salt of the Earth

    • @statquest
      @statquest  2 หลายเดือนก่อน

      Thanks!

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

    Very clear, I got the idea of this concept right away.
    Well done, thanks!

  • @derpfaceonigiri4950
    @derpfaceonigiri4950 5 ปีที่แล้ว +6

    Thank you! This helped me so much in understanding KNN faster :D

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

      Hooray!!! :)

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

    Thank you so much. So useful honestly - i didnt get this from a 2 hour lecture

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

      Glad it was helpful!

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

    When I search for something and find it on StatQuest channel. Super BAM!!

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

    WOWW! This was super helpful!
    Thanks Josh!

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

      Glad it was helpful!

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

    Thank you. Very good explanation in such a short time.

  • @fafamnzm3126
    @fafamnzm3126 5 ปีที่แล้ว +9

    Your videos are sooo great, I can't stop watching 💖💖 thank you

    • @statquest
      @statquest  5 ปีที่แล้ว

      Hooray!!!!

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

      StatQuest with Josh Starmer can you add an ICA as well?

    • @statquest
      @statquest  5 ปีที่แล้ว

      It's on the to-do list, but it might be a while before I get to it.

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

      StatQuest with Josh Starmer 😔😕 that's sad, but i look forward to it. You explain beautifully sir! 💪🏼👊🏼

  • @kuangliew
    @kuangliew 6 ปีที่แล้ว +2

    Amazing explanation! Thank you!

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

    Clear and concise explanation. Thank you :)

  • @Guinhulol
    @Guinhulol 4 หลายเดือนก่อน +1

    I am brushing up on my ML terminology and StatQuest always comes to the rescue!! BAM!

    • @statquest
      @statquest  4 หลายเดือนก่อน +1

      bam!

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

    Thank you josh and the FFGDUNCCH (the friendly folks from the genetics department at the university of north carolina at chapel hill)

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

      Triple bam! :)

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

    Very well explained and loved your uke intro by the way :)

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

    Easy to understand and straightforward. Thanks.

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

    I am so glad I found this channel.

  • @stalindavid8208
    @stalindavid8208 5 ปีที่แล้ว +6

    Thank you for your Clear explanation.

    • @statquest
      @statquest  5 ปีที่แล้ว

      You're welcome! :)

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

    Another exciting episode of statquest!

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

      bam! :)

  • @sabindawadi741
    @sabindawadi741 11 หลายเดือนก่อน +1

    Simple and Clear explanation. Thank you!

    • @statquest
      @statquest  11 หลายเดือนก่อน

      Thanks!

  • @Maddie-gt6pn
    @Maddie-gt6pn 4 ปีที่แล้ว +1

    such an amazing explanation. Thank you!

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

    BAM!!! That was great as usual.

    • @statquest
      @statquest  4 ปีที่แล้ว

      Hooray! Thank you! :)

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

    Ohhh man this so simple
    Thqqq for this type of explanation

    • @statquest
      @statquest  3 ปีที่แล้ว

      Most welcome 😊

  • @lilmoesk899
    @lilmoesk899 7 ปีที่แล้ว +2

    Good stuff, thanks! Do you have any videos about survival analysis?

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

    You're a legend at explaining.

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

    awesome explanation ! thank you so much!

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

    Summarised in a very short video....just perfect

    • @statquest
      @statquest  3 ปีที่แล้ว

      Thank you! :)

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

    Many thanks for the clear explanation

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

    Great explanation! BAM! Great illustrations! Double BAM!!

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

      Thank you very much! :)

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

    thank you so much.This was well explained.

  • @VH-yg8rx
    @VH-yg8rx ปีที่แล้ว +1

    Dang. Simple and to the point! Thank you!

  • @mastermike890
    @mastermike890 6 ปีที่แล้ว +3

    awesome! You should do a quadratic discriminant analysis to go with your awesome one on LDA

  • @raptorrv1828
    @raptorrv1828 3 ปีที่แล้ว +2

    BAM! Amazing explanation!

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

    Bam! Smart and clear as usual.

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

    one video explained better than a whole semester

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

      Awesome! :)

  • @grovvy_essence.1070
    @grovvy_essence.1070 2 ปีที่แล้ว +1

    Loved it.... Thank you 😊

    • @statquest
      @statquest  2 ปีที่แล้ว

      Glad you enjoyed it!

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

    Best explanation ever, thank you!!!

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

    Well explained, thank you good sir!

    • @statquest
      @statquest  2 ปีที่แล้ว

      Glad it was helpful!

  • @hianjana
    @hianjana 5 ปีที่แล้ว +5

    Your video is amazing as always... It would be great if you can include how to choose the value for 'k' and evaluation metrics for kNN. Also, if I understand it right, there is no actual "training" happening in kNN. It is about arranging the points on the cartesian plane and when a new data point comes, it will again be placed on the same plane and depending on the value of "k", it will be classified. Correct me if I'm wrong.

    • @startrek3779
      @startrek3779 2 ปีที่แล้ว

      Hi. Yes, you are right. KNN is easy to implement and understand and has been widely used in academia and industry for decades. You may utilise the cross-validation technique and the validation datasets to select the value for k.

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

    Wow! such a great explainer

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

      Glad you think so!

  • @davidk7212
    @davidk7212 ปีที่แล้ว +2

    That opening banjo solo is prettt sweet.

  • @qicai3682
    @qicai3682 ปีที่แล้ว +2

    This channel is GOD SENT. Period.

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

    I love you sir! Your video save my life!

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

      Happy to help!

  • @mengxiaozhang3035
    @mengxiaozhang3035 3 ปีที่แล้ว

    Just come across the video! Love it!! It's really clear and easy to follow! :D I have a question regarding the steps. For step 1, you said it would be used for known categories, and Im looking to use this method for unknown categories. Since we know all most of the traits, is there anyway to create categories using those characteristics? I'm new for machine learning and I wonder is there any method for this?

    • @statquest
      @statquest  3 ปีที่แล้ว

      It depends on a lot of things. Creating categories from the raw data can be very subjective.

    • @mengxiaozhang3035
      @mengxiaozhang3035 3 ปีที่แล้ว

      @@statquest Would it be possible to categorize items having trait 1,2,3,4 using similarity tests? But then the question is then where to start with.

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

    You are amazing! Thank u so much.
    Cheers from BRAZIL

    • @statquest
      @statquest  3 ปีที่แล้ว

      Muito obrigado! :)

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

    Just wow thanks Josh. You are just great. One doubt however, if k values are large will outliers not affect my algo? Effect of outliers in knn? Please answer.

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

      I believe that large values for K will provide some protection from outliers.

  • @minkymoo5773
    @minkymoo5773 2 ปีที่แล้ว

    Thank you so much for the video! I do have one question, though, relating to what you were saying about what happens if you have too large of a K (at the end of the video)...is this algorithm something that would inherently not work very well in cases where you have much larger sample sizes for some groups/clumps than others? It seems like it would always have a bias towards groups with larger sample sizes over ones with smaller ones...

    • @statquest
      @statquest  2 ปีที่แล้ว

      That's a good question and I don't know the answer off the top of my head. To me, it seems like it could go either way.

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

    Thank you so much for saving our time sir❤ love from Srilanka 🇱🇰

    • @statquest
      @statquest  10 หลายเดือนก่อน

      bam!

  • @tanguyvranckx1134
    @tanguyvranckx1134 5 หลายเดือนก่อน +1

    Where would I be without StatQuest? Luckily, I now have the statistical tool to estimate this!

    • @statquest
      @statquest  5 หลายเดือนก่อน

      bam!

  • @eltajbabazade1189
    @eltajbabazade1189 3 ปีที่แล้ว +3

    Man, you are a legend, if I pass from the exam on Monday (which I am pretty hopeless), I will buy one of your shirts next month

    • @statquest
      @statquest  3 ปีที่แล้ว +2

      Hooray! Good luck with your exam! :)

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

      @@statquest Hey, I failed :D but still, I learnt a lot, thanks!

    • @statquest
      @statquest  3 ปีที่แล้ว

      @@eltajbabazade1189 Better luck next time! :)

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

    Thank you very much for your amazing work! Question kind of not related, but I was wondering: is there any explanation on euclidean distance calculated in stata as well? Thanks!

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

      Unfortunately I don't know how to use stata.

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

    Thanks sir, great explanation!

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

      Glad you liked it!

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

    BAM!!! You nailed it.

    • @statquest
      @statquest  4 ปีที่แล้ว

      Thank you! :)

  • @vikasvarma9299
    @vikasvarma9299 4 ปีที่แล้ว

    please do statquest videos on complete model building projects in R!!

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

    Great tutorial!

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

      Thank you!

  • @unnatinandrekar99
    @unnatinandrekar99 3 ปีที่แล้ว

    Your videos are really great! Clear and detailed explanation. Can you please make a similar detailed playlist for neural networks?

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

      I'm working on it. I have 5 videos so far, and 5 more to go before I have the whole playlist. Here's the link to the first one: th-cam.com/video/CqOfi41LfDw/w-d-xo.html and the other links are here: statquest.org/video-index/

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

      @@statquest Yes I have seen those videos, just wanted to know whether there are more videos to come. Eagerly waiting!

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

      @@unnatinandrekar99 The next one comes out on Monday, and then the rest will come out, one or two per week, for the next month.

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

      @@statquest BAM!!!! That's prefect!!!!!!!!

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

    THANK YOU JOSH!

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

    THANK YOU!
    YOU HAVE SAVED ME :D

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

    You're a legend ! Thank you :)

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

    you are the master of machine learning

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

    You are awesome man!!

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

    Hello Josh how are you. I was wondering if you may kindly explain the Naive Bayes, to be clearly explained :)

  • @MB-vd6hc
    @MB-vd6hc 4 ปีที่แล้ว +1

    Thanks alot for this video.

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

    Good job ! I loved the videooo :)

  • @karennino6639
    @karennino6639 3 ปีที่แล้ว

    hey there! love your videos thank you so much, I'm still a bit confused though , does not knn only work with numerical features?

    • @statquest
      @statquest  3 ปีที่แล้ว

      It will work for any distance metric. So if you have a distance metric for categorical data, it will work. However, typically it is just used for numeric data.

  • @THEMATT222
    @THEMATT222 2 ปีที่แล้ว +5

    Your videos are K-nearest perfection :)

    • @statquest
      @statquest  2 ปีที่แล้ว +2

      Ha! Very funny.

    • @THEMATT222
      @THEMATT222 2 ปีที่แล้ว +2

      @@statquest Noice 👍 Thanks 👍

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

    Thank you so much

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

      No problem!

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

    lifesaver! thank you!

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

      Glad it helped!

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

    was extremely helpful tysm

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

    Nice video well done

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

    Your videos are brilliant! Would you also do a series of videos on scRNAseq/spatial transcriptomics analysis?

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

      I'll keep that in mind!

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

    Omg, thank you so much!!!!!

    • @statquest
      @statquest  3 ปีที่แล้ว

      Happy to help!

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

    Thank you!

  • @TheSuperninja10
    @TheSuperninja10 5 ปีที่แล้ว +2

    I like your bandcamp!

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

      Hooray! Thank you! :)

  • @suhailshaikh5091
    @suhailshaikh5091 4 ปีที่แล้ว

    Another one of best resource.
    Can you please tell what does it mean by "it adds weight to each distance giving ever slightly more weight to large clusters than to small cluster".

    • @statquest
      @statquest  4 ปีที่แล้ว

      One way to think about the "weights" is that if I have two clusters, A and B, and A is larger than B, then a new point that is equidistant to both A and B will be added to cluster A since it is larger. In other words, the larger the cluster, the more likely a new point will be put into that cluster.

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

      @@statquest That's great Josh! Thanks a lot for the video series. You really rock!

  • @francoischouinard8526
    @francoischouinard8526 2 ปีที่แล้ว

    Great videos. Do you have one that explains Parzen Windows for non parametric estimates?

  • @devolopeagae5411
    @devolopeagae5411 5 หลายเดือนก่อน

    what exactly does the model store after being trained? Does it store all the features and labels in our training data? So that while predicting it can compare with all distances?

    • @statquest
      @statquest  5 หลายเดือนก่อน

      I believe so.

  • @EmapMe
    @EmapMe 4 ปีที่แล้ว

    Maybe make a video on bayesian classification? Also, we should choose a k that isn't a multiple of the number of categories to avoid a tied vote.

    • @statquest
      @statquest  4 ปีที่แล้ว

      I should have a video on that topic by the end of February or early March.

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

    That is awsom how you explain this topics. One suggestion, you could show how the 7 nearest ist red, 3 nearest ist orange and 1 nearest is green for the point in the middle. By my eyes, the 1 nearest neigbour ist still red! and it makes me confuse what does nearest means actually :)

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

      What time point, minutes and seconds, are you referring to?

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

    Hey Josh! This is just a thank you note saying if I pass the upcoming exam, then it would be all because of you! ❤

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

      Good luck!!! Let me know how it goes!

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

      @@statquest It went well, thank you! Hopefully I get good grades. I was thinking of suggesting that it would be great if you could cover Markov Chain Monte Carlo and related topics. Thank you again! Your channel has been incredibly helpful!

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

      @@suparnaroy2829 I'm glad it went well! And I'll keep those topics in mind.

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

    Explanation was very very very good. Easily understandable by anyone almost.
    Can you please do a video on KFold and StratifiedKFold with an example using python. Also, can you explain cross_val_score in details

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

      I have a video on cross validation that covers the concepts in K-Fold cross validation. That might not be exactly what you are looking for, but just in case, here is the link: th-cam.com/video/fSytzGwwBVw/w-d-xo.html

  • @lucaslai6782
    @lucaslai6782 3 ปีที่แล้ว

    Hello Josh, Could you tell me when and where I should use KNN, KMC, Hierarchical, or other unsupervised machine learnings? By this I mean, are there any metrics to judge which one is better? Or in which situation, this one is more suitable than another one?

    • @statquest
      @statquest  3 ปีที่แล้ว

      It depends on the field and your goal. Often heatmaps are clustered with hierarchal clustering. PCA is often combined with KNN.

  • @AnupKumar-nz2qq
    @AnupKumar-nz2qq 4 ปีที่แล้ว

    Thanks you for the clear explanation.sir can suggest me how l can deal with imbalance data.

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

      I'll be talking about that on my livestream on Monday (9am, New York Time).

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

    Thanks for the very informative info ! Though I have a question , if my dataset is filled with just categorical string data. So no numerical data . Is there a way I can still use knn to predict ? I heard about encoding the string to numerical value but that seems very complex with big dataset .

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

      If you use R, then you can use a Random Forest to cluster anything and then apply KNN to that clustering: th-cam.com/video/sQ870aTKqiM/w-d-xo.html If you don't use R, you can use target encoding: th-cam.com/video/589nCGeWG1w/w-d-xo.html

  • @ja1211
    @ja1211 24 วันที่ผ่านมา +1

    Omg thank you so much

    • @statquest
      @statquest  24 วันที่ผ่านมา

      No problem!

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

    great video

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

    Excellent

    • @statquest
      @statquest  3 ปีที่แล้ว

      Thank you so much 😀

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

    Amazing!

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

    thank you so much for this video! i have my midterm tomorrow and im so scared :(

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

      Good luck!!

  • @sanaali3069
    @sanaali3069 9 หลายเดือนก่อน +1

    My 10 year old hums statquest song made me realise I my new obsession with this

    • @statquest
      @statquest  9 หลายเดือนก่อน

      bam!

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

    Please do a video on K-Medoid

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

      I'll keep that in mind.