KNN Flashcards

1
Q

full KNN form

A

K nearest neighbour

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

k value

A

odd/even

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

how to decide k value

A

‘k’ value will be decided based on the no. of classes present in the output parameter gf training data set

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

When will be k even and when it will be odd

A

If training data set contain even no. of class labels then ‘k’ value is an odd no.
If training data set contain odd no. of class labels then ‘k’ value is an even no.

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

k formula

A

k = n+1 [n: number of class labels]

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

knn algo (3 other properties of algo i.e. type of algo)

A

KNN algo is:
* Non parametric learning algo
* Instance based learning algo
* Lazy learning algo

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

Non parametric algo
also example

A

Knn is a non parametric algo because this model is never trained with an input parameter
Non parametric algo in ML are methods that do not assume a fixed form or finite set of parameters for the model structure. Instead they allow to the model to grow in complexity with the size of the training data.
Ex: KNN, Decision trees, SVM

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

Instance based algo

A

KNN is an instance based learning algo means given new observation (test data/test instance) comapred with all the training data set samples to make the predictions.
Instance based learning also known as lazy learning algorithms are class of ML techniques that delay the process of generalizing the training data until a query is made. Unlike eager learning algorithms which build a model during the training phase, instance based learning store the instances and use them directly to make predictions.

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

Lazy learning algo

A

KNN algo is lazy learning algo means no model is trained to make the predictions.
Instance based learning also known as lazy learning algorithms are class of ML techniques that delay the process of generalizing the training data until a query is made. Unlike eager learning algorithms which build a model during the training phase, instance based learning store the instances and use them directly to make predictions.

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

KNN - Classification / Regression

A

Both classification and regression

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

note about training data set in knn

A

This algo is continuously updated with a new training data set

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

When is knn used?

A

KNN is used when the relationship between feature is complex not linear

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

Hamming Distance

A

If x1 and x2 are the attribute value of two instances then if x1==x2 then hamming distance is 0 else if x1≠ x2 then distance is 1

hamming distance is case sensitive

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

KNN output diagram

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

Que1 of KNN

A

class I

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