Skip to main content

KNN CLASSIFIER

DA2 ML VITOL PART3
Web, Network, Programming, Artificial Intelligence


 

A

B

C

D

Output

Some

High

False

French

Yes

Full

Low

False

Thai

No

Some

Low

False

Burger

Yes

Full

Low

False

Thai

Yes

Full

High

False

French

No

Some

Normal

True

Italian

Yes

None

Low

True

Burger

No

Some

Normal

True

Thai

Yes

Full

Low

True

Burger

No

Full

High

False

Italian

No

None

Low

False

Thai

Yes

Full

Low

False

Burger

Yes

 

 

  1. Let the testing instance be (A = Full, B = Normal, C=False, D=Thai). Using K as values ranging from 1 to 10, identify the output.
  2. Implement KNN classifier for the dataset by varying K from 1 to 10. (Use training dataset as testing dataset). Draw graphs representing accuracy with value of K for the testing dataset. Identify the minimum value of ‘K’ that is optimum.



Popular posts from this blog

IMPLEMENTATION OF KNN CLASSIFIER

1.       Predict the food type for tomato (A = 6 B = 4) with k=2 using the below the training data set.   Ingredient A B Food Type Grape 8 5 Fruit Beans 3 7

Example problem on simple linear regression

1.      Consider the following farmer dataset.   Number of pounds per acre (in hundreds) Bushels per acre X y 1.0 25 2.5 32 3.0 35 3.0 32 3.4