title: How to find Entropy of Split points when building Decision tree?
body: <p>Given a binary classification problem:</p>
  
  <p><a href="https://i.stack.imgur.com/98t0W.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98t0W.jpg" alt="enter image description here"></a></p>
  
  <p>There are four positive examples and five negative examples. Thus,
  P(+) = 4/9 and P(−) = 5/9. The entropy of the training examples is
  −4/9 log2(4/9) − 5/9 log2(5/9) = 0.9911.</p>
  
  <p>For a3, which is a continuous attribute, I want to find the information gain for every split.</p>
  
  <p>So I sort a3 values in ascending order and find their Split points. But how do I calculate their Entropy?</p>
  
  <p>The answer given is:</p>
  
  <p><a href="https://i.stack.imgur.com/8dd3i.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8dd3i.jpg" alt="enter image description here"></a></p>
  
  <p>Information Gain column in above image is just 0.9911 - Entropy.</p>
  
  <p>But how do I find the Entropy?</p>
  
  <p>The formula for Entropy is:</p>
  
  <p><a href="https://i.stack.imgur.com/r5exj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r5exj.jpg" alt="enter image description here"></a> </p>
  
  <p>But I'm not understanding how to use this formula to find Entropy of the Split points.</p>