Machine Learning Fundamentals: The Confusion Matrix

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024

Комментарии • 678

  • @statquest
    @statquest  2 года назад +17

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

  • @read89simo
    @read89simo 5 лет назад +505

    the Confusion matrix is not so confusing anymore

  • @gsp_ram
    @gsp_ram 11 месяцев назад +1

    The whisperr at first is very addictive.. 😂 statsquest

  • @saramahmoudzadeh1956
    @saramahmoudzadeh1956 5 месяцев назад +1

    thank you statquest

    • @statquest
      @statquest  5 месяцев назад +1

      You're welcome!

  • @Leonardo-jv1ls
    @Leonardo-jv1ls 5 лет назад +7

    for each in range(0:10000):
    print(each,"bam!")

    • @statquest
      @statquest  5 лет назад +2

      This is my favorite program ever! :)

  • @biswarooppattnaik4488
    @biswarooppattnaik4488 4 года назад +1

    Thanks a ton and love for BAM😀

  • @preethi9087
    @preethi9087 Год назад +1

    nice songs and concepts too

  • @tanphan3970
    @tanphan3970 3 года назад

    Hello Josh,
    Thank for clearly example about Heart Disease.
    I have a question
    In your result, comparation between 2 algorithms A,B ( Logistic, K-neighbors, ...) for training always have same logic:
    If TP of A > TP of B , so TN of A > TN of B => easy to choose a better algorithm (A)
    I am confused that this logic is true or random in your example, isnt it?
    Because if TP of A > TP of B and TN of A < TN of B, I am not confident to choose A. ( I think TP and TN have same profit in validation)
    Thank you and Have a good day!

    • @statquest
      @statquest  3 года назад

      For more details on how to choose the best algorithm see: ruclips.net/video/4jRBRDbJemM/видео.html

  • @raaghavsharma378
    @raaghavsharma378 5 лет назад

    Thanks .... BAMMM !!!!!
    I will definitely buy one song :)

    • @statquest
      @statquest  5 лет назад +1

      Hooray!!! Thank you so much! :)

  • @TheBluesFlame
    @TheBluesFlame 4 года назад +160

    Understood the concept within 2 mins, something my professor was not able to achieve in a three hour lecture, and this video is free to watch. Thank you for the informative and extremely helpful video!

    • @statquest
      @statquest  4 года назад +7

      Awesome! :)

    • @ravimishra8564
      @ravimishra8564 2 года назад +2

      Lol

    • @tsunamio7750
      @tsunamio7750 2 года назад +5

      This is the magic of RUclips. Shorter videos are often more information-dense and have "less noise" -> Less text = less things that you will mistakenly focus on instead of the true Banger concept.
      Teachers spend 30s explaining what we will learn. Everybody misses this part and are confused for th rest of the course. Here, we have a full 2-5min explanation of what we are talking about, then we delve in the subject.

    • @LeSandWhich
      @LeSandWhich Год назад

      MERICA BABY!!!

    • @godspowerchukwuma2248
      @godspowerchukwuma2248 Год назад +2

      This is me watching this 5 years after graduating from higher institution and I am understanding it completely for the first time....school was truly annoying, they made even the simplest things feel so complicated and hard to understand

  • @ronyroy2049
    @ronyroy2049 5 лет назад +155

    I keep coming back for the BAAAMMMM !!!

  • @jessstuart7495
    @jessstuart7495 5 лет назад +49

    False Positive - Type 1 Error - Reject a true null-hypothesis.
    False Negative - Type 2 Error - Fail to reject a false null-hypothesis.

  • @vivekakaviv
    @vivekakaviv 5 лет назад +51

    "In this case the machine learning algorithm didn't do very well, but can you blame it?, These are all Terrible movies!!... BAM" I laughed like hell. Love StatQuest.

  • @gyulboxing
    @gyulboxing 2 года назад +33

    If my software venture succeeds, then I hugely owe it to you. Your pedagogical approach in the topic will benefit many individuals/teams like me. Thank you, sir!

  • @JingwenZhou
    @JingwenZhou 4 года назад +26

    You made me start loving maching learning and statistics, thank you!

  • @venkydk
    @venkydk 3 года назад +15

    The Intro song gives a great relief for us to get rid of confusion...

  • @yangwang6805
    @yangwang6805 6 лет назад +25

    Very clearly explained, thank you! As good as always!

  • @alexandrebernat1405
    @alexandrebernat1405 3 года назад +14

    Had to sign up as a member of StatQuest and support your initiative. Thank you so much for making all this content available. Greetings from Brazil, Josh!

    • @statquest
      @statquest  3 года назад +1

      Muito obrigado!!! Thank you very much for your support. It means a lot to me.

  • @thehermitthetower1126
    @thehermitthetower1126 2 года назад +32

    I'm now double certified in data science, and singly so in digital forensics. I began with stat quest, and I keep using it for refreshers if I have a meeting or interview.
    Here I am, prepping for possible interview questions that come up a lot.

    • @statquest
      @statquest  2 года назад +1

      Good luck with your interview! :)

    • @taheralipatrawala7300
      @taheralipatrawala7300 2 года назад

      By double certified you mean dual degree?

    • @thehermitthetower1126
      @thehermitthetower1126 2 года назад +2

      @@taheralipatrawala7300 no, i was in a coding boot camp but they kept dropping the ball so i was stuck waiting for long periods of time while they fixed mistakes and put the curriculum on hold so i enrolled in another course and they both ended up finishing around the same time.
      Then i enrolled in something else after, all the while i have a growing project portfolio full of cool projects people like discussing, which is pretty big if you are good at the interview stage.
      Tech is an interesting field in this respect:
      experience and education are both good, but both is great.

    • @braulioandre2918
      @braulioandre2918 2 года назад +1

      What are sort of questions come up a lot during interviews for a data science role?

  • @lizny9261
    @lizny9261 5 лет назад +13

    I laughed at that < bam. > I am a big fan of your BAM videos! lool

  • @mostinho7
    @mostinho7 4 года назад +14

    1:30 To test how each machine learning model performs with our test data, we can use a confusion matrix.
    Let’s say we have two outcomes from our classification model, either true or false, then the rows can be the predicted values for our model (true and false) and the columns can be the actual truth results of our data (true and false)
    Data points can be classified by our model as true positive (both predicted and actual are true) or false positive (predicted is true but actual is false) or false negative (predicted is false but output is true) or true negative (predicted is false and actual is false)
    4:30 using confusion matrix to compare random forest and logistic regression.
    5:15 confusion matrix for multiple class classification, the diagonal represents number of true positives

  • @pablouribe1522
    @pablouribe1522 Год назад +6

    I really liked how you mixed the sentiments in the bams, depending on the results! Great videos!

  • @fedriknefario
    @fedriknefario 3 года назад +4

    hey this is my first time watching your video, and thank you for your explanations about confusion matrix i like it.
    i'm still student

    • @statquest
      @statquest  3 года назад

      Glad it was helpful!

  • @amitshah1651
    @amitshah1651 2 года назад +3

    Trillion BAM. Wonderful Guru, Fun learning.

  • @achus76
    @achus76 3 года назад +4

    your videos are so enjoyable, makes it a joy to learn the stuff...esp the BAM :)

  • @TheMediinaa
    @TheMediinaa 2 года назад +5

    Very nice, I'm dealing with the Kuzushiji-49 dataset, and so I have a 49x49 confusion matrix. Helped clear things out a lot!

  • @hendsaud134
    @hendsaud134 2 года назад +5

    I was miserable but you boosted my mood, the intro is on point, BAM!

  • @harkirehal258
    @harkirehal258 5 месяцев назад +3

    Came across Statquest after almost giving up on learning ML. Things are starting to make sense and are fun now! Amazing channel with amazing explanations!

    • @statquest
      @statquest  5 месяцев назад

      Great to hear!

  • @editedrectangle1385
    @editedrectangle1385 5 дней назад +2

    I hope your knowlege and wisdom can help me ace my sem finals and get my degree

  • @unpatel1
    @unpatel1 2 года назад +5

    Confusion Matrix is really confusing but you clearly explained it! Great job, Josh!! Thank you.

    • @statquest
      @statquest  2 года назад

      Glad it was helpful!

  • @katwoods8514
    @katwoods8514 3 года назад +4

    I realize you should know: half of the time I like your videos, it's not because of the teaching. It's just me loving your songs and how you whisper excitedly "StatQuest!" at the beginning. It's the best!

  • @shivamsood8385
    @shivamsood8385 3 года назад +2

    awesome explanation. loved the BAM!!

  • @agentanakin9889
    @agentanakin9889 5 лет назад +3

    A Harvard course introduced the confusion matrix to me and it was thoroughly confusing. You explained it within the first 2 minutes of this video.

  • @f.s.8443
    @f.s.8443 2 года назад +3

    Thank you so much! You explained in 8 minutes what my Data Science Professor took forever to explain. It was so clear and concise.

    • @statquest
      @statquest  2 года назад +1

      Glad it was helpful!

  • @moones2012
    @moones2012 10 месяцев назад +1

    감사합니다!! thank you... this video is really helpful for my categorical data analysis class.. from south Korea,,,,,,,,,,,,,,,,,

    • @statquest
      @statquest  10 месяцев назад

      Thank you! If you like this video, check out the korean translation of my book: www.yes24.com/Product/Goods/117173369

  • @josevaldes7493
    @josevaldes7493 Год назад +3

    Thank! I speak spanish and I'm learning english. Your videos are amazing and I'll tried to make videos of statistics in spanish. You are an inspiration to me thanks soo much

  • @SoftwareTICs
    @SoftwareTICs 3 года назад +3

    I needed to understand confusion matrix as soon as possible. I learned in less than 10 minutes... great!

  • @toddpeterson5904
    @toddpeterson5904 Год назад +2

    +1 for Troll 2 from the residents of Nilbog!

  • @baharehbehrooziasl9517
    @baharehbehrooziasl9517 7 месяцев назад +1

    Like you have "Double BAM", you also need to add "Double Like" to your videos for the times we re-watch them!

    • @statquest
      @statquest  7 месяцев назад +1

      That would be awesome! :)

  • @Redox_Adi
    @Redox_Adi 8 месяцев назад +1

    Thanks for helping me to get out of this problem,as today is my Artificial intelligence exam,love from India.

  • @BigAsciiHappyStar
    @BigAsciiHappyStar 4 месяца назад +1

    5:45 I think we can blame the ML algorithm, because it is significantly worse than random guessing! 😁

  • @sayak
    @sayak 4 года назад +3

    BAM! that cleared the confusion. Double BAM!

  • @samarthtandale9121
    @samarthtandale9121 Год назад +2

    Awesome and Easy Explanation !!!

  • @badoiuecristian
    @badoiuecristian 4 года назад +2

    Note! In skelearn, confusion_matrix is the other way round. Actuals are on the left and predicted on top. Just in case your model preforms amazing.. for some reason :))

  • @Anti-socialSocialClub
    @Anti-socialSocialClub 3 года назад +2

    Oh my goodness, did someone else watch Cool as Ice?....I feel sorry for you, I wake up in cold sweats over that movie!
    btw; I have watched 3 of those movies...I don't know what I'm doing with my life

  • @wasifallvi5468
    @wasifallvi5468 Год назад +1

    Superv Explanation, Understand it very well. Thanks a lot StatQuest

  • @alaapdhall8541
    @alaapdhall8541 5 лет назад +5

    0:12 .. naughty americaaaa..

  • @prasangbiyani
    @prasangbiyani 4 года назад +4

    Confusion Matrix used to be confusing ;)

  • @yrrep27
    @yrrep27 Год назад +1

    Cool as Ice takes place in the same universe as the live action TMNT movies from the 90s.

  • @cajogos
    @cajogos 4 года назад +3

    Woah, this whole confusion matrix finally made sense in my head, only took 6mins! I watch at 1.25x speed ;) gotta learn fast! Thanks a lot Josh, subscribed!

    • @statquest
      @statquest  4 года назад +1

      Hooray! I'm glad the video was helpful. :)

  • @mkaberli
    @mkaberli 4 года назад +2

    It would be interesting to identify the false positives and negatives that the random Forest and k-means algorithms that were the same, if any. If there were many, then that would indicate that the metrics used were in the analysis needed tweaking.

  • @sagarmehla2102
    @sagarmehla2102 3 года назад +1

    row should be actual and columns should be predicted otherwise it will be confusing later.

    • @statquest
      @statquest  3 года назад +1

      That depends. Sometimes rows are "actual" and columns are "predicted", sometimes (like in this video, in the wikipedia article on confusion matrices and in the R programming language) it is the other way around.

  • @DataScienceAI-rf4kx
    @DataScienceAI-rf4kx 8 месяцев назад +1

    revise the concepts ! hooray ! tiny bam , big bam!! love you joshu

  • @Pqj613
    @Pqj613 Год назад +1

    Holly crab , this video made everything clear . Thank you.

  • @shivrajbhatti1074
    @shivrajbhatti1074 4 года назад +3

    That's the most academic BAM! ive ever heard

  • @the_sunlit
    @the_sunlit 5 лет назад +3

    Can you blame em, these are all terrible movies! 😂😂

  • @phucnguyenhoang234
    @phucnguyenhoang234 11 месяцев назад +1

    Woww what a nice chanel, i wish i met you sooner. Thank you very much.

  • @akashdeep5088
    @akashdeep5088 Год назад +1

    Sir, I am from India , I was enrolled in a Data Science programme which costed me 45k the python and SQL courses were nice but then also I had to put a lot of effort mastering it , but the ML classes was not at all good, currently my class is going on ML when I am writing this comment but I am not attending it and rather watching your video , I don't want to waste my time there just to satisfy myself that I have paid a huge amount of money rather I want to utilise my time into the video where I can really understand something.
    Lastly I want to thank you for providing such awesome content , currently I am not working so I have some limitation for spending money, but when I will get a job in data Science and ML I will surely contribute to this channel ."Thank You Again ....."
    Love from INDIA . " Jai Shree RAM "

    • @statquest
      @statquest  Год назад

      Thank you and good luck with your course! BAM! :)

    • @PSTWFB
      @PSTWFB Год назад

      #confusion#matrix#machinelearning#deep#precision#recall F1 #score#accuracy#true#positive #negative!
      ruclips.net/video/YlFgsaxagX0/видео.html

  • @vatsala6497
    @vatsala6497 3 года назад +1

    Day 1.
    of watching all the videos in the Machine Learning Playlist

  • @thenoobgamer7307
    @thenoobgamer7307 4 года назад +2

    I understood this concept BAAAAAMM

  • @gulbansaldesignexams
    @gulbansaldesignexams 3 года назад +2

    binge-watching! let's see where I go.

  • @brpawankumariyengar4227
    @brpawankumariyengar4227 3 года назад +1

    Yet another Amazing Video ….. 👍🏻👍🏻👍🏻

    • @statquest
      @statquest  3 года назад

      Thank you so much 😀

  • @SinarJourney
    @SinarJourney Год назад +1

    Gotta smash that like and subscribe button, this channel is golden.

  • @MehmetMustafaICER
    @MehmetMustafaICER 5 лет назад +3

    Very good explanation. Thanks.

  • @flaviovitoriano2429
    @flaviovitoriano2429 Год назад +1

    'uncofusing' the confusion matrix, BAM!

  • @Henvag
    @Henvag 3 часа назад

    My confusion about the confusion matrix is a False Negative now, or something like that

  • @timepassbox
    @timepassbox 5 месяцев назад +1

    Great 👍🏻🎉 Thanks for your support and Video

  • @PunmasterSTP
    @PunmasterSTP 6 месяцев назад +1

    I think the term "confusion matrix" just sounds cool!

  • @lawrencetaulk7898
    @lawrencetaulk7898 3 года назад +2

    you made me so clear with Confusion Matrix. Great job, BAM .

    • @statquest
      @statquest  3 года назад

      Glad it was helpful!

  • @nicoleluo6692
    @nicoleluo6692 Год назад +1

    Bam!!! I fully understand now. Thank you!

  • @UsmanKhan-lp2mg
    @UsmanKhan-lp2mg 4 года назад +2

    No Triple BAM in this StatQuest video

    • @statquest
      @statquest  4 года назад +1

      Good observation! :)

    • @UsmanKhan-lp2mg
      @UsmanKhan-lp2mg 4 года назад +1

      StatQuest with Josh Starmer Not as good as your explanation of the Gradient Descent and Confusion Matrix. You saved my life!

    • @statquest
      @statquest  4 года назад +1

      Hooray! Thank you! :)

  • @worldwide6626
    @worldwide6626 Год назад +1

    "can you blame them? These are all terrible movies"
    "bam"

  • @blessinglotus
    @blessinglotus 3 года назад +2

    Thank you for explaining the Confusion Matrix! This is super helpful. I keep coming back for more of your videos! THANK YOU.

  • @wanderingseeker2932
    @wanderingseeker2932 2 года назад +1

    Guy just simplified "THEEE CONNFFUSION MAATTRIXX" (reverberating sound)
    Thanks Josh :)

  • @Pilotamericano
    @Pilotamericano 2 года назад +1

    thanks! this was very informative and fun and easy as well

    • @statquest
      @statquest  2 года назад

      Glad it was helpful!

  • @vijaikannan3143
    @vijaikannan3143 Год назад +1

    WOW .... Beautiful Explanation in a simple and Understandable way with diagrams... Thanks a lot. Helped me a lot to understand in a crystal clear way.

  • @jaiganeshjayaraman
    @jaiganeshjayaraman Год назад +1

    Mind Blowing Explanation !! Even a primary school kid could understand these concepts. Take a bow, Josh !!!

  • @netviz8673
    @netviz8673 10 месяцев назад +1

    The size of the confusion matrix is determined by the number of things we want to predict.

    • @statquest
      @statquest  10 месяцев назад

      yep

    • @netviz8673
      @netviz8673 10 месяцев назад +1

      @@statquest oh my god. I was just using the comments as a way to make notes. Didn't think that I would get a reply from you. Loved your content btw :)

  • @samiotmani9092
    @samiotmani9092 7 месяцев назад +1

    Go to finish the 96 videos in Two weeks … Bam !

  • @BMSKARATE
    @BMSKARATE 3 года назад +1

    Me: learning ML and trying decision trees. YOU: explaining exactly what I'm doing step by step in 1 video.

  • @nossonweissman
    @nossonweissman 2 года назад +1

    Your content is so beautiful, it makes me want to cry

  • @amralaarag4563
    @amralaarag4563 4 года назад +2

    Really very good explanation , Thank you :)

    • @statquest
      @statquest  4 года назад

      Glad it was helpful!

  • @etornamtsyawo6407
    @etornamtsyawo6407 Год назад +1

    I didn't sweat it at all! I just moved to youtube and searched: Statquest confusion matrix 😀😀😀

  • @thechesslobster2768
    @thechesslobster2768 3 года назад +1

    I just want to say thank you so much man, i've been sucking ass in my machine learning class, and you've helped me out so much, I love how you explain things.

    • @statquest
      @statquest  3 года назад

      Thank you! Good luck with your class.

  • @mikifarman9570
    @mikifarman9570 6 лет назад +2

    Hey, nice job. I am wondering which software you are using to make the slides and videos. Is that PowerPoint or something else? I like the way you presenting

    • @statquest
      @statquest  6 лет назад +2

      Thanks! The early StatQuests were done in PowerPoint, but then that started crashing on me in the middle of presentations so I moved to Keynote.

    • @_Chafia
      @_Chafia 6 лет назад +1

      3 in 1
      always usefull to pass here
      Thank you Mr. Starmer for the KEY the BAM and the nice statQuest
      Wish you the best SIR

    • @statquest
      @statquest  6 лет назад

      Thank you so much!!! :)

  • @thepraisejames
    @thepraisejames 2 месяца назад +1

    This is the best video on confusion matrix I have watched. Once again, analogies and storytelling to the rescue

  • @ceciliaserafini
    @ceciliaserafini 5 лет назад +2

    BAM!!! Thank you! Original and clear explanation!

    • @statquest
      @statquest  5 лет назад

      Hooray! You're welcome. :)

  • @MrKingoverall
    @MrKingoverall 4 года назад +2

    I. Love. Stat. Quest

  • @tsunamio7750
    @tsunamio7750 2 года назад +1

    My terrible joke apart, your explanations are wonderful. I can't thank you enough!
    Done once, forever and for everyone. Who knows, your name might survive the corroding waves of history. A little something often takes unexpected proportions, even long after the author is gone.

  • @venkteshmutalik2518
    @venkteshmutalik2518 3 года назад +1

    Great Video , Thank you . Really helped .

  • @jijie133
    @jijie133 5 лет назад +2

    In most case, x axis stand for ground truth and y axis stand for predicted values.

    • @statquest
      @statquest  5 лет назад

      Python does it one way, R, and the wikipedia article on confusion matrices, does it another. en.wikipedia.org/wiki/Confusion_matrix
      So it's good to be able to adjust to either configuration.

    • @jijie133
      @jijie133 5 лет назад

      @@statquest I agree.

  • @jeremiahblessing3891
    @jeremiahblessing3891 4 года назад +1

    My Confusion matrix size was (50,50) until i see your video it became (2,2). Lol

  • @KeysOnFire17
    @KeysOnFire17 3 месяца назад +1

    Great video! Thanks.

    • @statquest
      @statquest  3 месяца назад

      Glad you liked it!

  • @NastyMonke
    @NastyMonke Год назад +1

    I have no idea how such a beautiful content have so low views and subscribers. Josh, you da best my man ❤

  • @ajinkyaadhotre5336
    @ajinkyaadhotre5336 Год назад +1

    need an extended version of the intro song , i loved it ! :D

  • @pricillajeyapaul
    @pricillajeyapaul 3 года назад +1

    thank u so much.i am so messed up with this topic.un explained me very easily

  • @arunavabhattacharya571
    @arunavabhattacharya571 4 года назад +1

    I rewatched the bootcamp recording which explained confusion matrix for 20 minutes and was still left confused until statquest came in an explained the concept in less than 7 minutes. BAM !!!

  • @goncaloleiria7575
    @goncaloleiria7575 5 лет назад +2

    Thank you for another great video. I have a question: What about continuous data?

    • @statquest
      @statquest  5 лет назад +2

      For continuous data we often use the "sum of the squared error" or the "mean squared error". If you measure the distances between the observed and predicted values, square them and add them up, you get the "sum of the squared error". If you then divide that sum by the number of observations, you get the average, or mean, squared error.

    • @goncaloleiria7575
      @goncaloleiria7575 5 лет назад +1

      @@statquest Thank you very much.

  • @Cat-ir8cy
    @Cat-ir8cy 3 года назад +1

    Just for that intro song I'm subscribing

  • @saranayakumar
    @saranayakumar 2 года назад +1

    Why didn't I stumble upon your videos earlier. Quality content.