Docsity

Information Theory - Machine Learning - Notes | CS 5350, Study notes of Computer Science

Toggle sidebar
bg1
Machine Learning (CS 5350/CS 6350) 28 August 2008
Information Theory
Information theory is the study of the transmission of bits across a noisy channel.
Suppose I have an alphabet {A, B, C, D}and I want to encode it in binary. I can use:
•A=h0,0i
•B=h0,1i
•C=h1,0i
•D=h1,1i
Now, suppose someone told me that in the messages I send, Ais more common than the others:
•p(A) = 1
2
•p(B) = 1
4
•p(C) = 1
8
•p(D) = 1
8
Can we do better? Sure?
•A=h0i
•B=h1,0i
•C=h1,1,0i
•D=h1,1,1i
This is clearly unambiguous and gets us an average of 1.75 bits/character.
The minimum number of bits is the entropy
H(X) = −X
x
p(X=x) log2p(X=x)
Zero entropy means deterministic, high entropy means close to uniform.
H(Y|X=x) is the number of bits needed to send Y, given that both the sender and recipient knew X=x.
(Specific conditional entropy.) It’s the same as entropy, but computed only over data points where X=x.
The full conditional entropy H(Y|X) is the expected specific conditional entropy:
H(Y|X) = X
x
p(X=x)H(Y|X=x)
Information gain IG(Y|X) is: i must send Y— how many bits would I save if both ends knew X?
IG(Y|X) = H(Y)−H(Y|X)
Intuitively, Xhas a high information gain with respect to Yif, knowing X, it takes many fewer bits to
transmit Y.
A few random notes for IG with respect to decision trees:
•We usually don’t need to actually compute H(Y) because it’s a constant for all features.
•It doesn’t matter what log you use so long as you’re consistent (it’s just a multiplicative constant).
1

Partial preview of the text

Download Information Theory - Machine Learning - Notes | CS 5350 and more Study notes Computer Science in PDF only on Docsity!

Machine Learning (CS 5350/CS 6350) 28 August 2008

Information Theory

Information theory is the study of the transmission of bits across a noisy channel. Suppose I have an alphabet {A, B, C, D} and I want to encode it in binary. I can use:

  • A = 〈 0 , 0 〉
  • B = 〈 0 , 1 〉

• C = 〈 1 , 0 〉

• D = 〈 1 , 1 〉

Now, suppose someone told me that in the messages I send, A is more common than the others:

  • p(A) = (^12)
  • p(B) = (^14)
    • p(C) = (^18)
    • p(D) = (^18)

Can we do better? Sure?

  • A = 〈 0 〉
  • B = 〈 1 , 0 〉

• C = 〈 1 , 1 , 0 〉

• D = 〈 1 , 1 , 1 〉

This is clearly unambiguous and gets us an average of 1.75 bits/character. The minimum number of bits is the entropy

H(X) = − ∑ x

p(X = x) log 2 p(X = x)

Zero entropy means deterministic, high entropy means close to uniform. H(Y |X = x) is the number of bits needed to send Y , given that both the sender and recipient knew X = x. (Specific conditional entropy.) It’s the same as entropy, but computed only over data points where X = x. The full conditional entropy H(Y |X) is the expected specific conditional entropy:

H(Y |X) =

x

p(X = x)H(Y |X = x)

Information gain IG(Y |X) is: i must send Y — how many bits would I save if both ends knew X?

IG(Y |X) = H(Y ) − H(Y |X)

Intuitively, X has a high information gain with respect to Y if, knowing X, it takes many fewer bits to transmit Y. A few random notes for IG with respect to decision trees:

  • We usually don’t need to actually compute H(Y ) because it’s a constant for all features.
  • It doesn’t matter what log you use so long as you’re consistent (it’s just a multiplicative constant).