Академический Документы
Профессиональный Документы
Культура Документы
1 Smoothing
4 Bayesian Networks
5 Summary
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
Smoothing
P(fr ) = 0.3 P(¬fr ) = 0.7
P(CH = ’none’ | fr ) = 0.1666 P(CH = ’none’ | ¬fr ) = 0
P(CH = ’paid’ | fr ) = 0.1666 P(CH = ’paid’ | ¬fr ) = 0.2857
P(CH = ’current’ | fr ) = 0.5 P(CH = ’current’ | ¬fr ) = 0.2857
P(CH = ’arrears’ | fr ) = 0.1666 P(CH = ’arrears’ | ¬fr ) = 0.4286
P(GC = ’none’ | fr ) = 0.8334 P(GC = ’none’ | ¬fr ) = 0.8571
P(GC = ’guarantor’ | fr ) = 0.1666 P(GC = ’guarantor’ | ¬fr ) = 0
P(GC = ’coapplicant’ | fr ) = 0 P(GC = ’coapplicant’ | ¬fr ) = 0.1429
P(ACC = ’own’ | fr ) = 0.6666 P(ACC = ’own’ | ¬fr ) = 0.7857
P(ACC = ’rent’ | fr ) = 0.3333 P(ACC = ’rent’ | ¬fr ) = 0.1429
P(ACC = ’free’ | fr ) = 0 P(ACC = ’free’ | ¬fr ) = 0.0714
count(f = v |t) + k
P(f = v |t) =
count(f |t) + (k × |Domain(f )|)
Raw P(GC = none|¬fr ) = 0.8571
Probabilities P(GC = guarantor |¬fr ) = 0
P(GC = coapplicant|¬fr ) = 0.1429
Smoothing k = 3
Parameters count(GC|¬fr ) = 14
count(GC = none|¬fr ) = 12
count(GC = guarantor |¬fr ) = 0
count(GC = coapplicant|¬fr ) = 2
|Domain(GC)| = 3
12+3
Smoothed P(GC = none|¬fr ) = 14+(3×3)
= 0.6522
0+3
Probabilities P(GC = guarantor |¬fr ) = 14+(3×3)
= 0.1304
2+3
P(GC = coapplicant|¬fr ) = 14+(3×3)
= 0.2174
Normal
(x − µ)2
x ∈R 1 −
µ∈R N(x, µ, σ) = √ e 2σ 2
σ ∈ R>0 σ 2π
Student-t
x ∈R κ+1
−
φ∈R Γ( κ+1 ) 1
2 2 2
ρ ∈ R>0 τ (x, φ, ρ, κ) = √ × 1+ ×z
κ ∈ R>0 Γ( κ
2
) × πκ × ρ κ
x −φ
z =
ρ
Exponential
(
−λx
x ∈R E(x, λ) = λe for x > 0
λ ∈ R>0 0 otherwise
Mixture of n Gaussians
x ∈R (x − µi )2
{µ1 , . . . , µn |µi ∈ R} n −
X ωi 2σi2
{σ1 , . . . , σn |σi ∈ R>0 } N(x, µ1 , σ1 , ω1 , . . . , µn , σn , ωn ) = √ e
{ω σ 2π
Pn1 , . . . , ωn |ωi ∈ R>0 } i=1 i
i=1 ωi = 0
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
Density
Density
Density
(a) (b)
Normal Normal
Student−t Student−t
(a) (b)
Density
Density
ε ε
PDF(x− ) PDF(x− )
2 2
A
PDF(x) PDF(x) PDF(x)
B
ε ε
PDF(x+ ) PDF(x+ )
2 2
ε ε ε ε ε ε
x− x x+ x− x x+ x− x x+
2 2 2 2 2 2
Figure: (a) The area under a density curve between the limits x − 2
and x + 2 ; (b) the approximation of this area computed by
PDF (x) × ; and (c) the error in the approximation is equal to the
difference between area A, the area under the curve omitted from the
approximation, and area B, the area above the curve erroneously
included in the approximation. Both of these areas will get smaller as
the width of the interval gets smaller, resulting in a smaller error in the
approximation.
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
0.0020
0.0020
0.0015
0.0015
Density
Density
0.0010
0.0010
0.0005
0.0005
0.0000
0.0000
0 500 1000 1500 2000 0 500 1000 1500 2000
(a) (b)
Figure: Histograms, using a bin size of 250 units, and density curves
for the ACCOUNT B ALANCE feature: (a) the fraudulent instances
overlaid with a fitted exponential distribution; (b) the non-fraudulent
instances overlaid with a fitted normal distribution.
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
Table: The probabilities, from Table 7 [29] , needed by the naive Bayes
prediction model to make a prediction for the query
hCH = ’paid’, GC = ’guarantor’, ACC = ’free’, AB = 759.07i and the
calculation of the scores for each candidate prediction.
Bayesian Networks
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
P(D=T)
D
0.4
D P(C=T|D)
P(A=T)
A T 0.2 C
0.4
F 0.2
P(A=T) P(A=F)
A
0.4 0.6
A C P(B=T|A,C)
T T 0.2
A P(B=T|A) P(B=F|A) T F 0.5 B
T 0.3 0.7 B F T 0.4
F 0.4 0.6 F F 0.3
(a) (b)
M M M
M M M M
M X M
M M M M
M M M
Target Fraud
(a) (b)
P(A=T) P(C=T)
A C
0.6 0.2
A P(B=T|A) C P(B=T|C)
T 0.3333 B T 0.5 B
F 0.5 F 0.375
A B P(C=T|A,B) C B P(A=T|B,C)
T T 0.25 T T 0.5
T F 0.125 C T F 0.5 A
F T 0.25 F T 0.5
F F 0.25 F F 0.7
(a) (b)
Figure: Two different Bayesian networks, each defining the same full
joint probability distribution.
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
Example
We wish to predict the CPI for a country with the follow
profile:
G INI C OEF = ’high’, S CHOOL Y EARS = ’high’
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
P(CPI = H, SY = H, GC = H)
P(CPI = H|SY = H, GC = H) =
P(SY = H, GC = H)
X
P(CPI = H, SY = H, GC = H, LE = i)
i∈H,L
=
P(SY = H, GC = H)
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
X
P(CPI = H, SY = H, GC = H, LE = i)
i∈{H,L}
X
= P(CPI = H|SY = H, LE = i) × P(SY = H|GC = H)
i∈{H,L}
0.02
P(CPI = H|SY = H, GC = H) = = 0.2
0.1
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
Summary
Smoothing Prob. Density Functions Binning Bayesian Nets Summary
1 Smoothing
4 Bayesian Networks
5 Summary