You are on page 1of 9

CE473: Machine Learning 18DCE125

PRACTICAL-6
Aim: Implement K-Nearest Neighbours, Support Vector Machine SVM and Naïve Bayes
Classifier with python’s Scikit-Learn on different datasets. Compare the classifiers based on
their evaluation measures.

Data Used for Problem:


Dataset Description:
Dataset is downloaded from http://www.cs.toronto.edu/~delve/data/comp- activ/desc.html.
Dataset name is Computer Activity Dataset.
Dataset has 13 number of attributes and 400 number of samples.
Dataset has Numerical types of samples.
Does dataset have a target attribute? YES

Did it have missing values and how did you deal with them? NO
Did you perform any data transformation tasks? NO
Did you perform any other data wrangling tasks? NO

Machine Learning Model:


What algorithm/ model did you use and with which parameters? K nearest neighbours, Naïve
bayes, Support Vector Machine
What are other algorithms/ models you could have used alternatively? Neural network,
Decision tree
What percentage of the dataset did you use for training and testing and how long did you train
for in terms of iterations/convergence/epochs? 90:10

Evaluation:
Which evaluation metric s did you use for the task? Classification report
Did your model underfit or overfit or did it perfectly fit the test data? Perfect
Did you train and evaluate the model again after changing its parameters? Why? No
What was the final accuracy/evaluation metric score that you obtained? 0.3643

DEPSTAR (CE-2) 1
CE473: Machine Learning 18DCE125

Practical Learning and Outcome:


In this practical we learned about different classification algorithms like Support vector
machine, naïve bayes and k nearest neighbors.

Code and Output:

DEPSTAR (CE-2) 2
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 3
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 4
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 5
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 6
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 7
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 8
CE473: Machine Learning 18DCE125

DEPSTAR (CE-2) 9

You might also like