Q1. Implement Naive Bayes method using scikit-learn
Used the given iris data set and performed cross-validation for training and testing part. And also evaluated the model on testing part.
PROGRAM
OUTPUT
Q2. Implement linear SVM method using scikit library
Used the same iris data set as above and also used the linear svc classifier on the data set.
PROGRAM
OUTPUT
Q3. Compare the results and report accuracy, precision, F-measure and Recall
The linear svm classifier is showing accuracy 96.67% and Gaussian Naive Bayes classifier is showing accuracy 93.33%, which means that both the classifiers accuracies are near to each other. So, both the classifiers performed well in terms of accuracy evaluation metric. And the report is as follows: