20190821

20190821

わかったこと

なんか基礎的なこと

確率変数の概念を導入しよう.

(Ω,F,P)(\Omega, \mathcal{F}, P)を確率空間とし,X:ΩXX: \Omega \to \mathcal{X}を確率変数とする.それでもって,述語fXf \circ Xが成り立つ確率を考える.

これは,Bf={xXf(x)}B_f = \left\{x \in \mathcal{X} | f(x)\right\}と定義して,

PX1(Bf)=P({ωΩX(ω)Bf}) \begin{aligned} P \circ X^{-1} (B_f) = P(\left\{\omega \in \Omega | X(\omega) \in B_f\right\}) \end{aligned}

と表せる.

二変数の場合,Y:ΩYY: \Omega \to \mathcal{Y}を用意して,(X,Y):ω(X(ω),Y(ω))(X, Y): \omega \mapsto (X(\omega), Y(\omega))とする.さらに,Bf={(x,y)X×Yf(x,y)}B_f = \left\{(x, y) \in \mathcal{X} \times \mathcal{Y} | f(x, y)\right\}とする.こうすると,ffが成り立つ確率が,

P(X,Y)1(Bf)=P({ωΩ(X,Y)(ω)Bf}) \begin{aligned} P \circ (X, Y)^{-1} (B_f) = P (\left\{\omega \in \Omega | (X, Y)(\omega) \in B_f\right\}) \end{aligned}

と書ける.

昨日は,

P({yYxX:f(x,y)}) \begin{aligned} P(\left\{y \in \mathcal{Y} | \exists x \in \mathcal{X}: f(x, y) \right\}) \end{aligned}

というのを考えたけど,これ,fy(x)f_y(x)を考えている.つまり,Y|\mathcal{Y}|の数だけ述語を考えている.関数の集合を考えるのではなくて,yyを使って関数を表している.この考え方はだいぶ使えそう.

述語の集合をF\mathcal{F}と書くと確率空間のσ\sigma-algebraと混同して紛らわしいので,述語をhhで表して,その集合をH\mathcal{H}と書くことにする.

ω\omegaを使って関数を表そう!

学習理論的なこと

裏にある,(Ω,F,P)(\Omega, \mathcal{F}, P)という確率空間を忘れないこと
扱う問題が,ω\omegaの述語になっていることが多いが,それがほとんどの場合省略されている.

Bh,c={xXh(x)c(x)}B_{h, c} = \left\{x \in \mathcal{X} | h(x) \neq c(x)\right\}という集合を考える.

generalization errorはPX=PX1P_X = P \circ X^{-1}Bh,cB_{h, c}を測ったもの.

R(h)=P({ωΩX(ω)Bh,c})=PX1(Bh,c) \begin{aligned} R(h) = P(\left\{\omega \in \Omega | X(\omega) \in B_{h, c}\right\}) = P \circ X^{-1} (B_{h, c}) \end{aligned}

empirical distribution

Dm=1mi=1mδxi \begin{aligned} D_m &= \frac{1}{m} \sum_{i=1}^m \delta_{x_i} \end{aligned}

empirical errorは,empirical distributionでBh,cB_{h, c}を測ったもの.

R^(h)=Dm(Bh,c) \begin{aligned} \hat{R}(h) &= D_m (B_{h, c}) \\ \end{aligned}

empirical distributionの値は確率変数(多分).なのでempirical errorも確率変数.

R^(h)(ω)=Dm(Bh,c)(ω)=1mi=1m1Bh,cXi(ω) \begin{aligned} \hat{R}(h)(\omega) = D_m(B_{h, c})(\omega) &= \frac{1}{m}\sum_{i=1}^m 1_{B_{h, c}} \circ X_i (\omega) \end{aligned}

これはサンプルによるのだから,当たり前といえば当たり前.

一方で,generalization errorは定数.

R^(h)=0\hat{R}(h) = 0なるhhを,consistent hypothesisと呼ぶ.
これは常に存在するとは限らないので,存在確率を考えてみよう.

P({ωΩhH:R^(h)(ω)=0})=P({ωΩhHR^(h)(ω)=0})=P(hH{ωΩR^(h)(ω)=0})hHP({ωΩR^(h)(ω)=0}) \begin{aligned} P \left(\left\{\omega \in \Omega | \exists h \in \mathcal{H}: \hat{R}(h)(\omega) = 0\right\}\right) &= P \left(\left\{\omega \in \Omega | \vee_{h \in \mathcal{H}} \hat{R}(h)(\omega) = 0\right\}\right) \\ &= P \left(\cup_{h \in \mathcal{H}} \left\{\omega \in \Omega | \hat{R}(h)(\omega) = 0\right\}\right) \\ &\leq \sum_{h \in \mathcal{H}} P \left(\left\{\omega \in \Omega | \hat{R}(h)(\omega) = 0\right\}\right) \end{aligned}

右辺の中身を少し調べると,

R^(h)(ω)=0i=1m1Bh,cXi(ω)=0i=1mXi(ω)Bh,c \begin{aligned} \hat{R}(h)(\omega) = 0 &\Leftrightarrow \wedge_{i=1}^m 1_{B_{h, c}} \circ X_i (\omega) = 0 \\ &\Leftrightarrow \wedge_{i=1}^m X_i(\omega) \notin B_{h, c} \\ \end{aligned}

となるので,

P({ωΩhH:R^(h)(ω)=0})hHP(i=1mXi1(Bh,cc))=hHi=1mPXi1(Bh,cc)=hHi=1m(1PXi1(Bh,c))=hH(1PX1(Bh,c))m=hH(1R(h))m=H(1R(h))m=:δ \begin{aligned} P \left(\left\{\omega \in \Omega | \exists h \in \mathcal{H}: \hat{R}(h)(\omega) = 0\right\}\right) &\leq \sum_{h \in \mathcal{H}} P \left(\cap_{i=1}^m X_i^{-1}(B^c_{h, c})\right) \\ &= \sum_{h \in \mathcal{H}} \prod_{i=1}^m P \circ X_i^{-1}(B^{c}_{h, c}) \\ &= \sum_{h \in \mathcal{H}} \prod_{i=1}^m (1 - P \circ X_i^{-1}(B_{h, c})) \\ &= \sum_{h \in \mathcal{H}} (1 - P \circ X^{-1}(B_{h, c}))^m \\ &= \sum_{h \in \mathcal{H}} (1 - R(h))^m \\ &= |\mathcal{H}| (1 - R(h))^m =: \delta\\ \end{aligned}

consistent hypothesisが存在する確率が,generalization errorを使って抑えられている.

ちょっとよくわからんけど,こんなバウンドを出せたのは初めてなので進歩したと思っておく.

sampleの話

S:ω(X1(ω),,Xm(ω))S: \omega \mapsto (X_1(\omega), \ldots, X_m(\omega))という確率変数を考える.
BXmB \subset \mathcal{X}^mに対して

PS1(B)=P({ωΩS(ω)B})P \circ S^{-1}(B) = P(\left\{\omega \in \Omega | S(\omega) \in B\right\})

を考える.これとempirical distributionとの関係は?

PS1P \circ S^{-1}Xm\mathcal{X}^m上の測度っぽいけど,empirical distributionはX\mathcal{X}上の測度.で,多分これもいろいろなところで使う.

hSh_Sなんかはサンプルに依存してるので,R(hS)R(h_S)とかを扱う際にはこれで測ることになる.結構複雑だ.あれ,ちょっと思いついた.

学習理論的なこと part 2

サンプルを使って出したhSHh_S \in \mathcal{H}がconsistentだとする.これは,SSに依存していて,確率変数とみなせる.

Bc={sXmPX1({xXhs(x)c(x)})} \begin{aligned} B_{c} = \left\{s \in \mathcal{X}^m | P \circ X^{-1}\left(\left\{x \in \mathcal{X} | h_s(x) \neq c(x)\right\}\right)\right\} \end{aligned}

これはまさに,hhssで表している!PS1P \circ S^{-1}で測れる.多分ssは無限個あるので,hsh_sも無限個ある.

0 件のコメント:

コメントを投稿

機械学習の問題設定

機械学習の問題設定 機械学習の問題設定を見直したのでメモ. ( Ω , F , P ) (\Omega, \mathcal{F}, P) ( Ω , F , P ) : ベースとなる確率空間 ( X , F X ) (\mathcal...