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

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 ...

Wana Become FORTUNE TELLER ?

Do you want to predict future of  a land price or do you want to predict prices of evey day in stock market Add caption

What is Meant by Inverter ?

inverter is basically  a device which converts ac voltage to dc voltage and we  will see this most often in our home when electricity goes off the inverter in our home will pass the the electricity basically the curent is stored in battery is dc voltage a inverter is a device which will  turn dc to ac . Now let’s talk more about  Inverters! Consider this circuit… This is the simplest circuit I could think of to show you how an inverter actually works! Our aim is to basically swap the polarities of the points A and B in the circuit at a fast enough rate! In this circuit  S 1 S 1  ,  S 2 S 2  ,  S 3 S 3  and  S 4 S 4  are 4 switches. All you gotta do is follow one simple rule! You can only turn on one pair of diagonal switches at a time. That means you can have these 2 possible cases… S 1 S 1  and  S 4 S 4  are turned on while  S 2 S 2  and  S 3 S 3  are turned off. S 1 S 1  and  S 4 S...