Machine Learning Algorithm Quizzes
Naive Bayes
Question 1
What is the fundamental 'naive' assumption made by the Naive Bayes classifier?
Question 2
The Naive Bayes algorithm is based on the famous mathematical principle known as __________ Theorem.
Question 3
You are building a text classifier to categorize news articles using word counts (e.g., using CountVectorizer). Which type of Naive Bayes classifier from scikit-learn is most suitable for this task?
Question 4
Which of the following statements about different Naive Bayes classifiers are true?
Question 5
In scikit-learn's MultinomialNB, the alpha hyperparameter is used for __________ smoothing, which helps handle features not seen in the training data for a particular class.
Question 6
Which line of code correctly imports the Multinomial Naive Bayes model from scikit-learn?
Question 7
What are the primary advantages of using a Naive Bayes classifier?
Question 8
A major drawback of Naive Bayes is its assumption of feature independence. When is this assumption most likely to hurt the model's performance?
End of Quiz
Your final score is: 0 / 0
List of Questions
Question 1: What is the fundamental 'naive' assumption made by the Naive Bayes classifier?
Answers: That all features are conditionally independent of each other, given the class..
Question 2: You are building a text classifier to categorize news articles using word counts (e.g., using `CountVectorizer`). Which type of Naive Bayes classifier from scikit-learn is most suitable for this task?
Answers: MultinomialNB.
Question 3: Which of the following statements about different Naive Bayes classifiers are true?
Answers: `GaussianNB` is the best choice for features like height, weight, and temperature., `MultinomialNB` requires all input features to be non-negative., `BernoulliNB` is typically used when features are binary (0s and 1s)..
Question 4: Which line of code correctly imports the Multinomial Naive Bayes model from scikit-learn?
Answers: from sklearn.naive_bayes import MultinomialNB.
Question 5: What are the primary advantages of using a Naive Bayes classifier?
Answers: They are very fast to train and predict., They perform well even with high-dimensional data (many features), such as text., They are easy to implement and provide a good baseline for classification problems..
Question 6: A major drawback of Naive Bayes is its assumption of feature independence. When is this assumption most likely to hurt the model's performance?
Answers: When features are highly correlated with each other..