Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Decision trees are supervised learning algorithms used for both, classification, and regression tasks where we will concentrate on classification in this example. Consider the
Decision trees are supervised learning algorithms used for both, classification, and regression tasks where we will concentrate on classification in this example. Consider the Following example which classifies animals as reptiles or mammals based on a set of features. toothed hair breathes legs species 1 True True True True Mammal 2 True True True True Mammal 3 True False True False Reptile 4 False True True True Mammal 5 True True True True Mammal 6 True True True True Mammal 7 True False False False Reptile 8 True False True False Reptile 9 True True True True Mammal 10 False False True True Reptile From the given Table it could be found that P(x=Mammal) =0.6 and P(x=Reptile)=0.4 The formal definition of Shannon's entropy which serves as the baseline for the information gain calculation: H(x)=-for k Etarget(P(x=k)*log2(P(x=k))) Our dataset has two target feature values in its target feature value space {Mammal, Reptile}. Given P(x=Mammal)=0.6 and P(x=Reptile)=0.4, the entropy of our dataset regarding the target feature is calculated with: H(x)=-((0.6*log2(0.6))+(0.4*log2(0.4)))=0.971 1. What does the above value represent w.r.t the given data?
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