Skip to main content

DECISION TREE CLASSIFIER USING ENTROPY METHOD

Basic introduction to Decision tree's Algorithm

Tree, Sunset, Amazing, Beautiful, Breathtaking

QUESTIONS:

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.                  Create a ID3 decision tree. Calculate entropy and Information gain at each step. Using the same training set as testing set, calculate all possible metrics.
  2.          For the above tree, calculate recall, precision and F1 score.


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

KNN CLASSIFIER

DA2 ML VITOL PART3   A B C D Output Some High False French Yes Full Low False Thai No Some

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