20190821

20190821

わかったこと

なんか基礎的なこと

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

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

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

P∘X−1(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×Y∣f(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({y∈Y∣∃x∈X: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={x∈X∣h(x)≠c(x)}B_{h, c} = \left\{x \in \mathcal{X} | h(x) \neq c(x)\right\}という集合を考える.

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

R(h)=P({ω∈Ω∣X(ω)∈Bh,c})=P∘X−1(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=1m∑i=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)(ω)=1m∑i=1m1Bh,c∘Xi(ω) \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({ω∈Ω∣∃h∈H:R^(h)(ω)=0})=P({ω∈Ω∣∨h∈HR^(h)(ω)=0})=P(∪h∈H{ω∈Ω∣R^(h)(ω)=0})≤∑h∈HP({ω∈Ω∣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)(ω)=0⇔∧i=1m1Bh,c∘Xi(ω)=0⇔∧i=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({ω∈Ω∣∃h∈H:R^(h)(ω)=0})≤∑h∈HP(∩i=1mXi−1(Bh,cc))=∑h∈H∏i=1mP∘Xi−1(Bh,cc)=∑h∈H∏i=1m(1−P∘Xi−1(Bh,c))=∑h∈H(1−P∘X−1(Bh,c))m=∑h∈H(1−R(h))m=∣H∣(1−R(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))という確率変数を考える.
B⊂XmB \subset \mathcal{X}^mに対して

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

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

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

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

学習理論的なこと part 2

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

Bc={s∈Xm∣P∘X−1({x∈X∣hs(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}

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

0 件のコメント:

コメントを投稿

機械学習の問題設定

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