Bernoulli Distribution [互換モード]yasuhiro-suzu/Bernoulli...Pattern Recognition and Machine...

9
北海道大学 大学院情報科学研究科 CS専攻 情報知識ネットワーク研究室 鈴木康広 Bernoulli Distribution

Transcript of Bernoulli Distribution [互換モード]yasuhiro-suzu/Bernoulli...Pattern Recognition and Machine...

北海道大学 大学院情報科学研究科 CS専攻 情報知識ネットワーク研究室 鈴木康広

Bernoulli Distribution

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

イントロダクション

ベルヌーイ分布(Bernoulli Distribution)– ベルヌーイ分布(1)・(2)– 対数尤度の最大化とサンプル平均

– 二項分布の平均と分散

1

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

ベルヌーイ分布(1)μ(0≦μ≦1)をパラメータとし、xを2値確率変数と定義

する。仮にx∈{0,1}の時、x=1となる確率をμを用いて表すと、

μμ )|1(xPまた、x=0の時は、

μμ 1)|0(xP

xxxBern 1)1()|( μμμ

したがってxの確率分布Bern(x|μ)は、

ベルヌーイ分布

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

ベルヌーイ分布(2)

xxxBern 1)1()|( μμμ

このベルヌーイ分布の平均E[x]と分散V[x]は、

Xの値 1 0 合計

P(x) μ 1-μ 1

平均(xp(x)) μ 0 μ

分散((x-μ)2p(x)) (1-μ)2μ (0-μ)2(1-μ) μ(1-μ)

3

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

対数尤度の最大化とサンプル平均(1)

xの観測値の集合D={x1,x2,…,x3}について考える。P(x|μ)からそれぞれ独立にこれらの値が得られたと仮定すると、μの関数である尤度関数P(D|μ)は以下のようになる。

N

n

N

n

xxn

nnxpDP1 1

1)1()|()|( μμμμ

次に、尤度関数の最大化を行うために、対数尤度を最大化する。

4

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

対数尤度の最大化とサンプル平均(2)

N

nnn

N

n

N

n

xxn

xx

xpDP nn

1

1 1

1

)1ln()1(ln

))1(ln())|(ln())|(ln(

μμ

μμμμ

N

n

nN

n

nN

n

nnn

N

nnn

xxxxx

xxDP

11 1

1

01

1)1()1(1

1)1()1(

11

}')1ln()1(ln{))}'|({ln(

μμμμμ

μ

μμμ

μ

μμ

μμμ

ln(P(D| μ))をμで微分した導関数を0とおく.

5

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

対数尤度の最大化とサンプル平均(3)

N

nnML

n

N

n

N

n

N

nn

N

nn

N

n

n

xN

Nx

x

x

x

1

1

11

1

1

1

0

01

1)1(

μμ

μ

μ

μ

μμμ

この時のμMLを最尤推定量と言い、サンプル平均と呼ばれる。

もし、x=1がm回出た時の最尤推定量はμML=m/N となる。これはx=1が出る確率を示している。

6

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

二項分布(1)前述のように、N個のデータ集合からx=1の時の観測値が

mである分布(二項分布)を考える。

mNm

mN

NmBin

)1(),|( μμμ 

!)!(!mmN

NmN

ただし、

7

Pattern Recognition and Machine Learning 2. Probability Distribution, which had read in Information Knowledge Network lab by Yasuhiro Suzuki.

二項分布(2)下図はN=10,μ=0.25の例を示す.m=0の時、Bin(m|10, 0.25) = 0.05631351470947265625m=1の時、Bin(m|10, 0.25) = 0.1877117156982421875m=2の時、Bin(m|10, 0.25) = 0.28156757354736328125m=3の時、Bin(m|10, 0.25) = 0.25028228759765625

8