Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. Q1)
  2. # - (9/12) (log(9/12)/log2) - (3/12) (log(3/12)/log2)
  3.  
  4. # = 0.8113
  5.  
  6.  
  7. Q2)
  8. Cloudy, because:
  9. 1)visually, it has the most matching datapoints
  10. 2)visually, the "yes" option for cloudy is guaranteed to eliminate "yes" results from rain
  11. 3)mathematically, it has the lowest entropy, in which it creates the highest information gain:
  12. entropy for (x|rain):
  13. Temperature (split 25-27|28-29): 0.9080
  14. Temperature (split 25-26|27-29): 0.8755
  15. UV Index: 0.8333
  16. Humidity: 0.8333
  17. Cloudy: 0.5732 *
  18.  
  19. Q3)
  20. Rain
  21. Yes No Total P(Clou) E P*E
  22. Cloudy Yes 3 0 3 0.25 0 0
  23. No 2 7 9 0.75 0.7 0.5
  24. 12
  25. Entropy = 0.5731
  26.  
  27. # Information Gain = 0.4067
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement