1 / 15

15-781 Machine Learning (Recitation 1)

15-781 Machine Learning (Recitation 1). By Jimeng Sun 9/15/05. Entropy. Entropy, Information Gain Decision Tree Probability. Suppose X can have one of m values… V 1, V 2, … V m

sashac
Download Presentation

15-781 Machine Learning (Recitation 1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 15-781 Machine Learning(Recitation 1) By Jimeng Sun 9/15/05

  2. Entropy • Entropy, Information Gain • Decision Tree • Probability

  3. Suppose X can have one of m values… V1, V2, … Vm What’s the smallest possible number of bits, on average, per symbol, needed to transmit a stream of symbols drawn from X’s distribution? It’s H(X) = The entropy of X “High Entropy” means X is from a uniform (boring) distribution “Low Entropy” means X is from varied (peaks and valleys) distribution Entropy

  4. Entropy H(*) X = College Major Y = Likes “XBOX” H(X) = 1.5 H(Y) = 1

  5. Specific Conditional Entropy H(Y|X=v) X = College Major Y = Likes “XBOX” Definition of Specific Conditional Entropy: H(Y |X=v) = The entropy of Y among only those records in which X has value v

  6. Specific Conditional Entropy H(Y|X=v) X = College Major Y = Likes “XBOX” • Definition of Specific Conditional Entropy: • H(Y |X=v) = The entropy of Y among only those records in which X has value v • Example: • H(Y|X=Math) = 1 • H(Y|X=History) = 0 • H(Y|X=CS) = 0

  7. Conditional Entropy H(Y|X) X = College Major Y = Likes “XBOX” Definition of Conditional Entropy: H(Y |X) = The average specific conditional entropy of Y = if you choose a record at random what will be the conditional entropy of Y, conditioned on that row’s value of X = Expected number of bits to transmit Y if both sides will know the value of X = Σj Prob(X=vj) H(Y | X = vj)

  8. Conditional Entropy X = College Major Y = Likes “XBOX” • Definition of Conditional Entropy: • H(Y|X) = The average conditional entropy of Y • = ΣjProb(X=vj) H(Y | X = vj) Example: H(Y|X) = 0.5 * 1 + 0.25 * 0 + 0.25 * 0 = 0.5

  9. Information Gain X = College Major Y = Likes “XBOX” • Definition of Information Gain: • IG(Y|X) = I must transmit Y. How many bits on average would it save me if both ends of the line knew X? • IG(Y|X) = H(Y) - H(Y | X) • Example: • H(Y) = 1 • H(Y|X) = 0.5 • Thus IG(Y|X) = 1 – 0.5 = 0.5

  10. Decision Tree

  11. Tree pruning

  12. Probability

  13. Test your understanding • All the time? • Only when X and Y are independent? • It can fail even if X and Y are independent?

More Related