SVM & KNN Flashcards

1
Q

What is SVM?

A

Support vector machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain SVM

A

it works best on smaller and complex datasets

can be used for both regression and classification tasks

here we try to find the best hyperplane that best separates the two classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how does SVM find the best hyperplane?

A

SVM does this by finding the maximum margin between the hyperplanes that means the maximum distance between the two classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are types of SVM

A

linear and non linear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is linear SVM

A

when the data is perfectly linearly separable.

that means that the data points can be classified into 2 classes using a single straight line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is non linear SVM

A

When the data is not linearly separable then we can use Non-Linear SVM, which means when the data points cannot be separated into 2 classes by using a straight line (if 2D) then we use some advanced techniques like kernel tricks to classify them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what are support vectors

A

these are the points that are closest to the hyperplane.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is margin

A

it is the distance between the hyperplane and the observations closest to the hyperplane (support vectors).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

which is considered a good margin

A

In SVM large margin is considered a good margin.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is KNN

A

K - nearest neighbour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

explain KNN

A

it is a popular machine learning algo used for classification and regression tasks

it relies on the fact that similar data points tend to have similar values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are aspects of KNN

A

ease of interpreting output
calculation time
predictive power

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

give an example of KNN

A

red circle, green square and blue start example

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

explain the KNN working

A

1 - select the number K of the neighbours

2 - calculate the Euclidean distance of K number of neighbours

3 - take the K nearest neighbors as per the calculated Euclidean distance.

4 - Among these k neighbors, count the number of the data points in each category.

5 - Assign the new data points to that category for which the number of the neighbor is maximum.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is Euclidean distance

A

distance measure to calculate the distance between test samples and trained data values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly