Question
(Decision tree) Entropy= -268/768 * log2(268/768) - 500/768 * log2(500/768) = 0.918 Information gain= Age < 30: Entropy = -20/100 * log2(20/100) - 80/100 *
(Decision tree)
Entropy=
-268/768 * log2(268/768) - 500/768 * log2(500/768) = 0.918
Information gain=
Age < 30: Entropy = -20/100 * log2(20/100) - 80/100 * log2(80/100) = 0.72
30 <= Age < 60: Entropy = -80/300 * log2(80/300) - 220/300 * log2(220/300) = 0.69
Age >= 60: Entropy = -168/368 * log2(168/368) - 200/368 * log2(200/368) = 0.95
Entropy(after split) = (100/768) * 0.72 + (300/768) * 0.69 + (368/768) * 0.95 = 0.86
Information Gain(Age) = Entropy(before split) - Entropy(after split) = 0.918 - 0.86 = 0.058
________________________________________________________________
From this information Write an introduction about the Gini index and calculate it.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started