Accuracy of Naive Bayes – Intro to Machine Learning

Accuracy of Naive Bayes – Intro to Machine Learning


All right. Fantastic. So we’re almost there. There’s going to be one more thing that I’m going to ask you to do before we finish with this unit and that is to evaluate our classifier. To quantify how well it’s doing at classifying points. Whether they’re terrain that we can drive fast on or terrain where we have to go more slowly. So the metric that we’re going to use in this case to decide how well our algorithm is doing is the accuracy. Accuracy is just the number of points that are classified correctly divided by the total number of points in the test set. So the quiz that I want you to answer right now is to tell me what the accuracy is of this Naive Bayes classifier that we’ve just made. And so there are two different ways that we can do this. The first is that you can actually take the the predictions that you’ve made here and you can compare them to the labels in your test set. Or what you can actually do is head back over to the scikit-learn documentation and see if there’s some scikit-learn function that might be able to take care of this for you. So, computing this accuracy element by element is one way that you can do it or if you want to be a little bit more adventurous. Go check out the documentation and maybe there’s a really cool one-liner that you can use from sklearn that’ll take care of this for you. Okay? So the quiz question is basically, do this calculation either on your own or using sklearn and tell me how accurate our classifier is.

4 thoughts to “Accuracy of Naive Bayes – Intro to Machine Learning”

  1. Really nice, I am new to this ML and each of your words help me to search for why ? which helps me understad the basics.

  2. please do some example.like running the or what so ever.I do coding and ur example isn't good.I didn't under anything about naive bayes.

Leave a Reply

Your email address will not be published. Required fields are marked *