SVM & Naive bayes
Assignment Questions
Theoretical
What is a Support Vector Machine (SVM)
What is the difference between Hard Margin and Soft Margin SVM
What is the mathematical intuition behind SVM
What is the role of Lagrange Multipliers in SVM
What are Support Vectors in SVM
What is a Support Vector Classifier (SVC)
What is a Support Vector Regressor (SVR)
What is the Kernel Trick in SVM
Compare Linear Kernel, Polynomial Kernel, and RBF Kernel
What is the effect of the C parameter in SVM
What is the role of the Gamma parameter in RBF Kernel SVM
What is the Naïve Bayes classifier, and why is it called "Naïve"
What is Bayes’ Theorem
Explain the differences between Gaussian Naïve Bayes, Multinomial Naïve Bayes, and Bernoulli Naïve Bayes
When should you use Gaussian Naïve Bayes over other variants
What are the key assumptions made by Naïve Bayes
What are the advantages and disadvantages of Naïve Bayes
Why is Naïve Bayes a good choice for text classification
Compare SVM and Naïve Bayes for classification tasks
How does Laplace Smoothing help in Naïve Bayes?
Practical
Write a Python program to train an SVM Classifier on the Iris dataset and evaluate accuracy
Write a Python program to train two SVM classifiers with Linear and RBF kernels on the Wine dataset, then
compare their accuracies
Write a Python program to train an SVM Regressor (SVR) on a housing dataset and evaluate it using Mean
Squared Error (MSE)
Write a Python program to train an SVM Classifier with a Polynomial Kernel and visualize the decision
boundary
Write a Python program to train a Gaussian Naïve Bayes classifier on the Breast Cancer dataset and
evaluate accuracy
Write a Python program to train a Multinomial Naïve Bayes classifier for text classification using the 20
Newsgroups dataset.
Pwskills
Java + DSA
Write a Python program to train an SVM Classifier with different C values and compare the decision
boundaries visually
Write a Python program to train a Bernoulli Naïve Bayes classifier for binary classification on a dataset with
binary features
Write a Python program to apply feature scaling before training an SVM model and compare results with
unscaled data
Write a Python program to train a Gaussian Naïve Bayes model and compare the predictions before and
after Laplace Smoothing
Write a Python program to train an SVM Classifier and use GridSearchCV to tune the hyperparameters (C,
gamma, kernel)
Write a Python program to train an SVM Classifier on an imbalanced dataset and apply class weighting and
check it improve accuracy
Write a Python program to implement a Naïve Bayes classifier for spam detection using email data
Write a Python program to train an SVM Classifier and a Naïve Bayes Classifier on the same dataset and
compare their accuracy
Write a Python program to perform feature selection before training a Naïve Bayes classifier and compare
results
Write a Python program to train an SVM Classifier using One-vs-Rest (OvR) and One-vs-One (OvO)
strategies on the Wine dataset and compare their accuracy
Write a Python program to train an SVM Classifier using Linear, Polynomial, and RBF kernels on the Breast
Cancer dataset and compare their accuracy
Write a Python program to train an SVM Classifier using Stratified K-Fold Cross-Validation and compute the
average accuracy
Write a Python program to train a Naïve Bayes classifier using different prior probabilities and compare
performance
Write a Python program to perform Recursive Feature Elimination (RFE) before training an SVM Classifier and
compare accuracy
Write a Python program to train an SVM Classifier and evaluate its performance using Precision, Recall, and
F1-Score instead of accuracy
Write a Python program to train a Naïve Bayes Classifier and evaluate its performance using Log Loss
(Cross-Entropy Loss)
Write a Python program to train an SVM Classifier and visualize the Confusion Matrix using seaborn
Write a Python program to train an SVM Regressor (SVR) and evaluate its performance using Mean Absolute
Error (MAE) instead of MSE
Write a Python program to train a Naïve Bayes classifier and evaluate its performance using the ROC-AUC
score
Write a Python program to train an SVM Classifier and visualize the Precision-Recall Curve.
Pwskills
Java + DSA