Statinfer

203.3.4 How to Calculate Entropy for Decision Tree Split?

LAB: Entropy Calculation – Example

In previous section, we studied about  How Decision tree Splits works?

  • Calculate entropy at the root for the given population
  • Calculate the entropy for the two distinct gender segments

Code- Entropy Calculation

  • Entropy at root 100%
  • Male Segment : (-48/60)log(48/60,2)-(12/60)log(12/60,2)
  • 0.7219281
  • FemaleSegment : (-2/40)log(2/40,2)-(38/40)log(38/40,2)
  • 0.286397

 

 

 

The next post is about Information Gain in Decision tree Split.

27th January 2017

0 responses on "203.3.4 How to Calculate Entropy for Decision Tree Split?"

Leave a Message

Blog Posts

Hurry up!!!

"use coupon code for FLAT 30% discount"  datascientistoffer        ___________________________________      Subscribe to our youtube channel. Get access to video tutorials.                

Contact Us

Statinfer Software Solutions#647 2nd floor 1st Main, Indira Nagar 1st Stage, 100 feet road,Indranagar Bangalore,Karnataka, Pin code:-560038 Landmarks: Opp. Namma Metro Pillar 48.

Connect with us

linkin fn twitter g

How to become a Data Scientist.?

top