Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Bahria University, Islamabad Campus

Department of Computer Science


CSL487: Introduction to Data Science Lab
Quiz # 2
Name: ___________________________ Enrollment #_______________________
1. Customer level of satisfaction such as: satisfied, neutral, dissatisfied is. (1)
a) Nominal
b) Ordinal
c) Binary
d)Numeric

2.The data set of N = 35 observations as shown below is examined.Draw boxplot to


detect outliers(4)
300, 171, 1876944,184, 201, 212,265, 0.1,270, 272, 289, 306, 322, 322, 370 , 404,
411,0.4, 439, 0.5, 585, 592, 592, 607, 616, 766, 794,858, 860, 869, 918, 953, 991,
1000,190041

Write all outliers in data (1)


1876944, 0.1 ,0.4, 0.5,190041

Data Science Lab Page 1


Bahria University, Islamabad Campus
Department of Computer Science

3.Classify by K-Nearest Neighbour (3)


X1 X2 Class
7 7 bad
7 4 Bad
3 4 Good
1 4 Good
3 7
Calculate distance by following formula with test point are following classify test point
with k=3
Distance formula=(y2-y1) 2+(x2-x1) 2

X1 X2 Distance
7 7 16
7 4 25
3 4 9
1 4 13

Class of test point :good

4.Briefly describe use of (1)


Scikit- Scikit-learn is a free software machine learning library for the Python
learn programming language. It features various classification, regression and
clustering algorithms including support vector machines

Data Science Lab Page 2

You might also like