Sie sind auf Seite 1von 16

Instructions: Create any confusion matrix by inputting value

Confusion Matrix

Condition X
[defective computer chip]

"+"
"-"

Individual Probabilities
P("+")
p("-")
p(Test POS)
p(Test NEG)
p(Test POS, "+")
p(Test NEG, "+")
p(Test "POS, "-")
p(Test "NEG", "-")

a
b
c
d
e
f
g
h

Probability Distributions
P(X)
P(Y)
p(X,Y)
P(X)p(Y)
Definition of Independence P(X,Y) = P(X)p(Y)
X, Y Independent or Dependent?

Dependent
Conditional Probabilities
p(Test POS | "+")
p(Test NEG | "+")
p(Test POS | "-")
p(Test NEG | "-")
p("+" | Test POS)
p( "-" | Test POS)
p("+" | Test NEG)
p("-" | Test NEG)

"Relative Entropy" of p and q, written D(p||q)


is the summation of all p(i)*log(p(i)/qIi)
It is also called "Kullback-Leibler Divergence" (or "KL D
The Relative Entropy of the Joint distribution p [row 28
[Note that this definition is not required for Course - ad

trix by inputting values for cells labelled a, c, and e.

Test Classification Y
[optical scanner on assembly line]
"Positive"
"Negative"
0.3 c
0.7
0.2 a

0.1 e

0.1

0.8 b

0.2 g

0.6

Name
Incidence of Condition "+"
Incidence of "Condition "-"
Classification Incidence "POS"
Classification Incidence "NEG"
True Positives
False Negatives
False Positives
True Negatives
Name
p(a,b)
Probability of the Condition
p(c,d)
Probability of the Classification
p(e,f,g,h)
Joint Distribution of X and Y
p(ac,ad,bc,bd)Product Distribution of X and Y

) = P(X)p(Y)

e/a

Name
0.50 True Positive Rate

f/a
g/b
h/b

0.50 False Negative Rate


0.25 False Positive Rate
0.75 True Negative Rate

e/c
g/c
f/d
h/d

0.33 Positive Predictive Value (PPV)


0.67 1- PPV
0.14 1- NPV
0.86 Negative Predictive Value (NPV)

itten D(p||q)
p(i)/qIi)
Divergence" (or "KL Divergence" for short)
distribution p [row 28] and the product distribution q [row 29] is the mutual i
equired for Course - advanced topic]

, and e.

The spreadsheet outputs en

sembly line]
egative"
d
f
h

H(X)

= a*log(1/a)
0.7219
0.4644

H(Y)

= c*log(1/c)
0.8813
0.5211

H(X,Y)

= e*log(1/e)
1.5710
0.3322

ification
X and Y

0.1 e
0.06 ac

Mutual Information I(X:Y) = Relative Entropy


= e*log(e/ac)
0.0736965594
0.0323

H(Y|X)

(a
0.2000

(c
0.3000

0.8490

ue (PPV)
H(X|Y)

lue (NPV)
0.6897

ibution q [row 29] is the mutual information [cell L35]

adsheet outputs entropy (information) measures for all relevant distribution

Percentage Information Gain (P.I.G.)


A correlation measure defined as mutual information between
divided by the entropy of the Condition X
I(X;Y)
0.0323 bits
divided by
H(X)
0.7219 bits
equals
4.47%
Average reduction in uncertainty of one outcome in X upon learning o

+ b*log(1/b)
0.2575

+ d*log(1/d)
0.3602

I(X;Y) =
H(X)
0.0323
0.7219
I(X;Y) =
H(Y)
0.0323
0.8813
I(X;Y) =
H(X)
0.0323
0.7219

+ f*log(1/f)
+ g*Log(1/g)
+ h*log(1/h)
0.3322
0.4644
0.4422
0.10 f
0.14 ad

0.20 g
0.24 bc

= Relative Entropy of Joint and Product Distributions --- D(p(X,Y||p(X)p(Y))


+ f*log(f/ad)
-0.0485426827 + g*log(g/bc) -0.05261

*H(e/a, f/a))
+
1.0000

(b *H(g/b, h/b)
0.8000
0.8113

*H(e/c, g/c)
+
0.9183

(d *H(f/d, h/d)
0.7000
0.5917

evant distributions.

n between X and Y

X upon learning one outcome in Y

- H(X|Y)
0.6897
- H(Y|X)
0.8490
+ H(Y)

- H(X,Y)
0.8813
1.5710

0.60 h
0.56 bd

p(X,Y||p(X)p(Y))
+ h*log(h/bd)

(g/b, h/b)

(f/d, h/d)

0.059721

Copyright Daniel Egger/ At

Venn diagram courtesy of Konrad Voelke

el Egger/ Attribution 4.0 International (CC BY 4.0)

of Konrad Voelkel - Wikipedia: https://en.wikipedia.org/wiki/Information_dia

C BY 4.0)

/Information_diagram

Das könnte Ihnen auch gefallen