教師あり学習

機械学習および
データマイニング
問題
理論
  • 偏りと分散のトレードオフ
  • 計算論的学習理論(英語版)
  • 経験損失最小化(英語版)
  • オッカム学習(英語版)
  • PAC学習
  • 統計的学習(英語版)
  • VC理論(英語版)
学会・論文誌等
  • NIPS(英語版)
  • ICML(英語版)
  • ML(英語版)
  • JMLR(英語版)
  • ArXiv:cs.LG

カテゴリ Category:機械学習

カテゴリ Category:データマイニング

教師あり学習(きょうしありがくしゅう, : Supervised learning)とは、機械学習の手法の一つである。

既知の「問題」xiに対する「解答」yiを「教師」が教えてくれるという方法であり、「生徒」であるアルゴリズムが未知の「問題」xに対応する「解答」yを推論する事から名付けられたものである。そのような訓練に用いるデータを事を教師データとも呼ぶ。

概要

教師あり学習では、未知の確率分布 p ( x , y ) {\displaystyle p(\mathbf {x} ,\mathbf {y} )} を対象に学習を行う。実応用上は何らかを入力(x)、出力(y)とみなせる事が多く、例えばyxに未知の関数Fを施した値F(x)に小さなノイズが載ったものである。アルゴリズムには、 p ( x , y ) {\displaystyle p(\mathbf {x} ,\mathbf {y} )} に従うxyの組 ( x 1 , y 1 ) , , ( x n , y n ) {\displaystyle (\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})} が訓練データとして与えられる。アルゴリズムが解くべきタスクは訓練データに属していない(かもしれない)データxに対し、条件付き確率分布 p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} ないしそこから決まる値(たとえば p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} の期待値)をよく近似することである[1]。近似の精度は事前に定められた損失関数という関数を使って評価する。したがって損失関数の値の期待値を小さくする事が、教師あり機械学習の目標であると言える。

機械学習の定義に沿って言えば、教師あり機械学習は以下のような機械学習であるといえる:

タスク 経験 性能指標
p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} ないしそこから決まる値をよく近似する事 訓練データ ( x 1 , y 1 ) , , ( x n , y n ) {\displaystyle (\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})} 損失関数の期待値

アルゴリズム

教師あり学習では事前知識である ( x 1 , y 1 ) , , ( x n , y n ) {\displaystyle (\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})} から、未知のxに対応するyの分布 p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} を当てる事が求められる。このため、アルゴリズムが未知のxから p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} (ないしそこから決まる値)を求める操作を汎化もしくは推論inference)と呼ぶ。タスクによっては「予測」「判断」「認識」等と呼ばれる事もある。

アルゴリズムは未知のデータxからxに対応するyの分布の情報を推測する必要があるが、この推論の為に事前知識として与えられる訓練データにはxiから推論しなければならないyiが「解答」としてついている。

訓練フェーズと汎化フェーズ

多くの教師あり機械学習のモデルでは、実際の汎化を行う前に訓練もしくは学習と呼ばれる作業が発生し、機械学習のモデルは「訓練アルゴリズム」と「汎化アルゴリズム」のペアとして捉える事ができる。訓練アルゴリズムは訓練データを入力として受け取り、パラメータと呼ばれる値θを出力する。パラメータは直観的には訓練データから有用な情報を引き出した「学習結果」であり、汎化の際にはこの「学習結果」であるθを使って汎化を行う。すなわち、汎化アルゴリズムは入力xの他にパラメータθをも入力として受け取り、 p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} (ないしそこから決まる値)を求める。

変数の名称

教師あり機械学習において、変数x説明変数(explanation variable)、y目的変数目標変数(target variable)、もしくは標的(target)と呼ぶ[2]。これらは別の名称で呼ばれる事も多く、x予測変数(predictor)、y応答変数response variable)と呼んだり[3]x独立変数(independent variable)、y従属変数(dependent variable)と呼んだりする事もある[3]。またタスクによってはこれら以外の名称で呼ばれる事もある。

タスク

教師あり学習に属する代表的なタスクとして回帰と分類がある。教師あり学習において、目的変数yが量的変数である場合を回帰(regression)、有限集合に値を取るカテゴリ型変数のである場合を分類(classification)もしくは判別と呼ぶ。[3][4]

典型的な訓練データ(例題)はベクトル(問題) x i {\displaystyle {\mathbf {x} }_{i}} とラベル(回答) y i {\displaystyle y_{i}} の組として、 ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . {\displaystyle ({\mathbf {x} }_{1},y_{1}),({\mathbf {x} }_{2},y_{2}),...} のように与えられる。ここで、 ( x i , y i ) {\displaystyle ({\mathbf {x} }_{i},y_{i})} i {\displaystyle i} 番目のデータを表し、 y i {\displaystyle y_{i}} は0または1の2値を取るのラベルで、 x i {\displaystyle {\mathbf {x} }_{i}} はベクトルを表す。

典型的な訓練データは分類問題では y i {\displaystyle y_{i}} が離散値を、回帰問題では実数値を取る。

これらのデータに何らかの基準でもっとも合う関数関係 y = f ( x ) {\displaystyle y=f(x)} を求める「学習」によって求められることで、未知のデータ x {\displaystyle {\mathbf {x} }} にに対して、予言 y = f ( x ) {\displaystyle y=f({\mathbf {x} })} を得ることができる。 y = f ( x ) {\displaystyle y=f(x)} を分類問題であれば分類器、回帰問題であれば回帰曲線などと称する。

回帰

回帰の目標は入力xが与えられたとき、 p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} に関する情報を予想する事である。典型的には

y = F ( x ) + ε {\displaystyle \mathbf {y} =F(\mathbf {x} )+\mathbf {\varepsilon } }

のようにyが未知の関数Fの像F(x)にランダムなノイズεを加えたデータであるケースにおいて、入力xからyの可能な限り正確な予想値 y ^ {\displaystyle {\hat {\mathbf {y} }}} を出力する事が求められる。なお回帰で扱う目的変数yは連続量であり、典型的には実数を複数並べた数値ベクトルである。

他の教師あり機械学習アルゴリズムと同様、回帰アルゴリズムは p ( x , y ) {\displaystyle p(\mathbf {x} ,\mathbf {y} )} に従って選ばれた訓練データの集合 D = { ( x 1 , y 1 ) , , ( x n , y n ) } {\displaystyle D=\{(\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})\}} をとして受け取る事ができ、これらの訓練データをヒントにして入力xに対応するyの予想値

y ^ = F ^ D ( x ) {\displaystyle {\hat {\mathbf {y} }}={\hat {F}}_{D}(\mathbf {x} )}

を出力する。予想の正確さは損失関数 L ( y ^ , y ) {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )} によって測られる。回帰では損失関数 L ( y ^ , y ) {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )} としては自乗誤差損失

L ( y ^ , y ) = | | y ^ y | | 2 {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )=||{\hat {\mathbf {y} }}-\mathbf {y} ||^{2}}

を用いる事が多い。

回帰の目標は、汎化誤差予測誤差予測損失とも)

E [ L ( y ^ ( x ) , y ) ] = L ( y ^ ( x ) , y ) p ( x , y ) d x d y {\displaystyle E[L({\hat {\mathbf {y} }}(\mathbf {x} ),\mathbf {y} )]=\iint L({\hat {\mathbf {y} }}(\mathbf {x} ),\mathbf {y} )p(\mathbf {x} ,\mathbf {y} )\mathrm {d} \mathbf {x} \mathrm {d} \mathbf {y} }

を小さく抑える事である。ここで y ^ ( x ) = M ( x , θ ) {\displaystyle {\hat {\mathbf {y} }}(\mathbf {x} )=M(\mathbf {x} ,\theta )} は汎化アルゴリズムの出力であり、E[・]は期待値を表す。

分類

分類タスクでは、事前に定められた有限個のクラスが定められていて、各クラスには、「ネコ」、「イヌ」などのクラスラベル(もしくは単にラベル)と呼ばれるクラス名が割り振られている。分類タスクの目的は与えられた入力xがのいずれに属するかを当てる事である。

分類タスクを解くアルゴリズムには大まかに「決定論的アプローチ」と「確率論的アプローチ」の2種類があり[5]、前者は分類タスクでは入力xが与えられたとき、xが属すると思われるクラスラベルを出力するというものであり、損失関数としては典型的には0-1損失

L ( y ^ , y ) = { 1 if  y ^ y 0 otherwise {\displaystyle L({\hat {y}},y)={\begin{cases}1&{\text{if }}{\hat {y}}\neq y\\0&{\text{otherwise}}\end{cases}}}

を使う[6]

一方、後者はクラスラベルを直接出力するのではなく、確信度confidence score y 1 ^ , , y k ^ {\displaystyle {\widehat {y_{1}}},\ldots ,{\widehat {y_{k}}}} を出力するというものである。ここで y j ^ {\displaystyle {\widehat {y_{j}}}} xj番目のクラスに属しているとどの程度確信しているかを表す尺度であり、 0 y j ^ 1 {\displaystyle 0\leq {\widehat {y_{j}}}\leq 1} y 1 ^ + + y k ^ = 1 {\displaystyle {\widehat {y_{1}}}+\cdots +{\widehat {y_{k}}}=1} を満たす。

確信度を出力させる分類タスクでは、訓練データ ( x i , y i ) {\displaystyle (\mathbf {x} _{i},\mathbf {y} _{i})} yiも確信度と整合性が取れるように符号化する。すなわち、xij番目のクラスに属している場合、 y i = e j {\displaystyle \mathbf {y} _{i}=\mathbf {e} _{j}} とする。ここでejj番目の成分が1でそれ以外の成分が0のベクトルである(このように1つの成分だけが1でそれ以外は0となるベクトルをone-hotベクトルとい、one-hotベクトルによりデータを表現する事をone-hot表現[7] という)。損失関数としては典型的には交差エントロピー

L ( y ^ , y ) = k y k log y k ^ {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )=-\sum _{k}y_{k}\log {\widehat {y_{k}}}}

を使う[6]

回帰と分類の関係性

確信度を使った分類タスクに対するアルゴリズムを設計する典型的な手法は、回帰タスクのアルゴリズムを流用するというものである。すなわちクラスをone-hotベクトルで符号化した訓練データ ( x 1 , y 1 ) , , ( x n , y n ) {\displaystyle (\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})} を使って回帰タスクのアルゴリズムを訓練し、訓練結果のアルゴリズムを分類タスクに利用するという手法である。ただし、回帰タスク出力 u ^ = ( u 1 ^ , , u k ^ ) {\displaystyle {\widehat {\mathbf {u} }}=({\widehat {u_{1}}},\ldots ,{\widehat {u_{k}}})} は、分類タスクの出力である確信度と違い、 0 u j ^ 1 {\displaystyle 0\leq {\widehat {u_{j}}}\leq 1} u 1 ^ + + u k ^ = 1 {\displaystyle {\widehat {u_{1}}}+\cdots +{\widehat {u_{k}}}=1} という条件を満たさないという問題が起こる。そこで一旦ソフトマックス変換

s o f t m a x   :   R k [ 0 , 1 ] k , ( u 1 , , u k ) 1 j = 1 k e u j ( e u 1 , , e u k ) {\displaystyle \mathrm {softmax} ~:~\mathbb {R} ^{k}\to [0,1]^{k},(u_{1},\ldots ,u_{k})\mapsto {1 \over \sum _{j=1}^{k}e^{u_{j}}}(e^{u_{1}},\ldots ,e^{u_{k}})}

をかける事でこの問題を解決する。

逆に確信度を使った分類タスクを回帰タスクに流用する事もでき、この場合は上と同様の理由でソフトマックス変換の逆変換をかける必要がある。

バイアスと分散のトレードオフ

詳細は「偏りと分散」を参照

回帰では、入力xに対応するyの予測値 y ^ = F ^ D ( x ) {\displaystyle {\hat {\mathbf {y} }}={\hat {F}}_{D}(\mathbf {x} )} を出力する事を求められ、 y ^ {\displaystyle {\hat {\mathbf {y} }}} yの期待値に近いことが望ましく、しかも y ^ {\displaystyle {\hat {\mathbf {y} }}} のばらつきは小さい方が望ましい。しかし下記に示すようにこの2つの要件はトレードオフの関係にある[8]

定理 (バイアスと分散のトレードオフ) ― p(x,y) R × R k {\displaystyle \mathbb {R} ^{\ell }\times \mathbb {R} ^{k}} 上の確率分布とし、D R × R k {\displaystyle \mathbb {R} ^{\ell }\times \mathbb {R} ^{k}} 上の何らかの確率分布に従って選ばれた訓練データの集合とし[注 1] F ^ {\displaystyle {\hat {F}}} を回帰アルゴリズムとし、Dによってこの回帰アルゴリズムを訓練して得られた関数を y ^ = F ^ D ( x ) {\displaystyle {\hat {\mathbf {y} }}={\hat {F}}_{D}(\mathbf {x} )} とし、誤差関数を自乗誤差

L ( y ^ , y ) = | | y ^ y | | 2 {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )=||{\hat {\mathbf {y} }}-\mathbf {y} ||^{2}}
により定義し、さらに ( x , y ) p {\displaystyle (\mathbf {x} ,\mathbf {y} )\sim p} Dとは独立に選び、
y ¯ ( x ) = E y p | x [ y | x ] {\displaystyle {\bar {\mathbf {y} }}(\mathbf {x} )=E_{\mathbf {y} \sim p|_{\mathbf {x} }}[\mathbf {y} |\mathbf {x} ]}
F ¯ ( x ) = E D [ F ^ D ( x ) ] {\displaystyle {\bar {F}}(\mathbf {x} )=E_{D}[{\hat {F}}_{D}(\mathbf {x} )]}
とする。

このとき、予測誤差の訓練データ集合Dに関する期待値(期待予測誤差[9]

E D [ E ( x , y ) p [ L ( F ^ D ( x ) , y ) ] = E ( x , y ) p , D [ | | F ^ D ( x ) y | | 2 ] {\displaystyle E_{D}[E_{(\mathbf {x} ,\mathbf {y} )\sim p}[L({\hat {F}}_{D}(\mathbf {x} ),\mathbf {y} )]=E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[||{\hat {F}}_{D}(\mathbf {x} )-\mathbf {y} ||^{2}]}
は以下を満たす:
E ( x , y ) p , D [ | | F ^ D ( x ) y | | 2 ] = V a r ( F ^ ) + B i a s 2 ( F ^ ) + N o i s e ( p ) {\displaystyle E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[||{\hat {F}}_{D}(\mathbf {x} )-\mathbf {y} ||^{2}]={\mathsf {Var}}({\hat {F}})+{\mathsf {Bias}}^{2}({\hat {F}})+{\mathsf {Noise}}(p)}
ここで、
V a r ( F ^ ) = E x p | x , D ( | | F ^ D ( x ) F ¯ ( x ) | | 2 ) {\displaystyle {\mathsf {Var}}({\hat {F}})=E_{\mathbf {x} \sim p|_{\mathbf {x} },D}(||{\hat {F}}_{D}(\mathbf {x} )-{\bar {F}}(\mathbf {x} )||^{2})}
B i a s 2 ( F ^ ) = E x p | x ( | | F ¯ ( x ) y ¯ ( x ) | | 2 ) {\displaystyle {\mathsf {Bias}}^{2}({\hat {F}})=E_{\mathbf {x} \sim p|_{\mathbf {x} }}(||{\bar {F}}(\mathbf {x} )-{\bar {\mathbf {y} }}(\mathbf {x} )||^{2})}
N o i s e ( F ^ ) = E ( x , y ) p ( | | y ¯ ( x ) y | | 2 ) {\displaystyle {\mathsf {Noise}}({\hat {F}})=E_{(\mathbf {x} ,\mathbf {y} )\sim p}(||{\bar {\mathbf {y} }}(\mathbf {x} )-\mathbf {y} ||^{2})}

証明

1 2 ( E ( x , y ) p , D [ | | F ^ D ( x ) y | | 2 ] V a r ( F ^ ) B i a s 2 ( F ^ ) N o i s e ( p ) ) = 1 2 E ( x , y ) p , D [ | | F ^ D ( x ) y | | 2 | | F ^ D ( x ) F ¯ ( x ) | | 2 | | F ¯ ( x ) y ¯ ( x ) | | 2 | | y ¯ ( x ) y | | 2 ] = E ( x , y ) p , D [ F ^ D ( x ) y + F ^ D ( x ) F ¯ ( x ) + F ¯ ( x ) y ¯ ( x ) + y ¯ ( x ) y | | F ¯ ( x ) | | 2 | | y ¯ ( x ) | | 2 ] = ( 1 ) {\displaystyle {\begin{aligned}&{1 \over 2}(E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[||{\hat {F}}_{D}(\mathbf {x} )-\mathbf {y} ||^{2}]-{\mathsf {Var}}({\hat {F}})-{\mathsf {Bias}}^{2}({\hat {F}})-{\mathsf {Noise}}(p))\\&={1 \over 2}E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[||{\hat {F}}_{D}(\mathbf {x} )-\mathbf {y} ||^{2}-||{\hat {F}}_{D}(\mathbf {x} )-{\bar {F}}(\mathbf {x} )||^{2}-||{\bar {F}}(\mathbf {x} )-{\bar {\mathbf {y} }}(\mathbf {x} )||^{2}-||{\bar {\mathbf {y} }}(\mathbf {x} )-\mathbf {y} ||^{2}]\\&=E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[-{\hat {F}}_{D}(\mathbf {x} )\cdot \mathbf {y} +{\hat {F}}_{D}(\mathbf {x} )\cdot {\bar {F}}(\mathbf {x} )+{\bar {F}}(\mathbf {x} )\cdot {\bar {\mathbf {y} }}(\mathbf {x} )+{\bar {\mathbf {y} }}(\mathbf {x} )\cdot \mathbf {y} -||{\bar {F}}(\mathbf {x} )||^{2}-||{\bar {\mathbf {y} }}(\mathbf {x} )||^{2}]=(1)\end{aligned}}}

ここで

E ( x , y ) p , D [ F ^ D ( x ) y + F ^ D ( x ) F ¯ ( x ) ] = E ( x , y ) p [ E D [ F ^ D ( x ) ] y + E D [ F ^ D ( x ) ] F ¯ ( x ) = E ( x , y ) p [ F ¯ ( x ) y + | | F ¯ ( x ) | | 2 ] {\displaystyle {\begin{aligned}&E_{(\mathbf {x} ,\mathbf {y} )\sim p,D}[-{\hat {F}}_{D}(\mathbf {x} )\cdot \mathbf {y} +{\hat {F}}_{D}(\mathbf {x} )\cdot {\bar {F}}(\mathbf {x} )]\\&=-E_{(\mathbf {x} ,\mathbf {y} )\sim p}[E_{D}[{\hat {F}}_{D}(\mathbf {x} )]\cdot \mathbf {y} +E_{D}[{\hat {F}}_{D}(\mathbf {x} )]\cdot {\bar {F}}(\mathbf {x} )\\&=E_{(\mathbf {x} ,\mathbf {y} )\sim p}[-{\bar {F}}(\mathbf {x} )\cdot \mathbf {y} +||{\bar {F}}(\mathbf {x} )||^{2}]\end{aligned}}}
なので、
( 1 ) = E ( x , y ) p [ F ¯ ( x ) y + F ¯ ( x ) y ¯ ( x ) + y ¯ ( x ) y | | y ¯ ( x ) | | 2 ] = E ( x , y ) p [ ( F ¯ ( x ) y ¯ ( x ) ) ( y ¯ ( x ) y ) ] = E x [ ( F ¯ ( x ) y ¯ ( x ) ) ( y ¯ ( x ) E y p | x [ y ] ) ] = 0 {\displaystyle {\begin{aligned}(1)&=E_{(\mathbf {x} ,\mathbf {y} )\sim p}[-{\bar {F}}(\mathbf {x} )\cdot \mathbf {y} +{\bar {F}}(\mathbf {x} )\cdot {\bar {\mathbf {y} }}(\mathbf {x} )+{\bar {\mathbf {y} }}(\mathbf {x} )\cdot \mathbf {y} -||{\bar {\mathbf {y} }}(\mathbf {x} )||^{2}]\\&=E_{(\mathbf {x} ,\mathbf {y} )\sim p}[({\bar {F}}(\mathbf {x} )-{\bar {\mathbf {y} }}(\mathbf {x} ))({\bar {\mathbf {y} }}(\mathbf {x} )-\mathbf {y} )]\\&=E_{\mathbf {x} }[({\bar {F}}(\mathbf {x} )-{\bar {\mathbf {y} }}(\mathbf {x} ))({\bar {\mathbf {y} }}(\mathbf {x} )-E_{\mathbf {y} \sim p|_{\mathbf {x} }}[\mathbf {y} ])]\\&=0\end{aligned}}}

上では回帰の場合について述べたが、確信度を出力する分類でも同様である。

ベイズ規則

Lp(x,y)をそれぞれ回帰や分類といった教師あり学習のタスクに対する損失関数、データ分布とし、関数Fに関する予測損失を R L ( F ) = E ( x , y ) p [ L ( F ( x ) , y ) ] {\displaystyle R_{L}(F)=E_{(x,y)\sim p}[L(F(x),y)]} と書き表す。このとき、予測損失の下限

i n f F R L ( F ) {\displaystyle {\underset {F}{\mathrm {inf} }}R_{L}(F)}
を損失関数Lのもとでのベイズ誤差(Bayes error)と呼び、下限を達成するFベイズ規則(Bayes rule)という[10]。ここで i n f F {\displaystyle {\underset {F}{\mathrm {inf} }}} 可測関数全体の集合における下限である。

ベイズ規則は理論上の最良の予測関数であるが、実際には確率分布p(x,y)が未知なので、p(x,y)に関する予測損失 R L ( F ) = E ( x , y ) p [ L ( F ( x ) , y ) ] {\displaystyle R_{L}(F)=E_{(x,y)\sim p}[L(F(x),y)]} を計算できず、ベイズ規則を求める事ができない。このため教師あり学習では既知のデータ ( x 1 , y 1 ) , , ( x n , y n ) {\displaystyle (\mathbf {x} _{1},\mathbf {y} _{1}),\ldots ,(\mathbf {x} _{n},\mathbf {y} _{n})} から可能な限りベイズ規則に近い値を出力するアルゴリズムを探索する事が求められる。

回帰

自乗損失を損失関数として選んだ場合、次の定理が成り立つ[11]

定理 (自乗損失に関する回帰のベイズ規則) ― p(x,y) R × R k {\displaystyle \mathbb {R} ^{\ell }\times \mathbb {R} ^{k}} 上の確率分布とし、

L ( y ^ , y ) = | | y ^ y | | 2 {\displaystyle L({\hat {\mathbf {y} }},\mathbf {y} )=||{\hat {\mathbf {y} }}-\mathbf {y} ||^{2}}
とする。このとき、汎化誤差 R L ( F ) = E ( x , y ) p [ L ( F ( x ) , y ) ] {\displaystyle R_{L}(F)=E_{(x,y)\sim p}[L(F(x),y)]} を最小にする F ( x ) {\displaystyle F(\mathbf {x} )} は、
F ( x ) = E [ y | x ] {\displaystyle F(\mathbf {x} )=E[\mathbf {y} |\mathbf {x} ]}
である。ここでEp(x,y)から定まる条件付き確率分布 p ( y x ) {\displaystyle p(\mathbf {y} \mid \mathbf {x} )} からランダムにyを選んだときの期待値である。

証明

E [ L ( F ( x ) , y ) ] = | | F ( x ) y | | 2 p ( x , y ) d x d y {\displaystyle E[L(F(\mathbf {x} ),\mathbf {y} )]=\iint ||F(\mathbf {x} )-\mathbf {y} ||^{2}p(\mathbf {x} ,\mathbf {y} )\mathrm {d} \mathbf {x} \mathrm {d} \mathbf {y} }
= ( | | F ( x ) y | | 2 p ( y x ) d y ) p ( x ) d x {\displaystyle =\int \left(\int ||F(\mathbf {x} )-\mathbf {y} ||^{2}p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} \right)p(\mathbf {x} )\mathrm {d} \mathbf {x} } を最小にするには、各xに対し、
S = | | F ( x ) y | | 2 p ( y x ) d y {\displaystyle S=\int ||F(\mathbf {x} )-\mathbf {y} ||^{2}p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} }
を最小にすればよい。
S = | | F ( x ) | | 2 p ( y x ) d y 2 F ( x ) y p ( y x ) d y + | | y | | 2 p ( y x ) d y = | | F ( x ) | | 2 2 F ( x ) E [ y x ] + | | y | | 2 p ( y x ) d y = | | F ( x ) E [ y x ] | | 2 | | E [ y x ] | | 2 + | | y | | 2 p ( y x ) d y {\displaystyle {\begin{aligned}S&=||F(\mathbf {x} )||^{2}\int p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} -2F(\mathbf {x} )\cdot \int \mathbf {y} p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} +\int ||\mathbf {y} ||^{2}p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} \\&=||F(\mathbf {x} )||^{2}-2F(\mathbf {x} )\cdot E[\mathbf {y} \mid \mathbf {x} ]+\int ||\mathbf {y} ||^{2}p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} \\&=||F(\mathbf {x} )-E[\mathbf {y} \mid \mathbf {x} ]||^{2}-||E[\mathbf {y} \mid \mathbf {x} ]||^{2}+\int ||\mathbf {y} ||^{2}p(\mathbf {y} \mid \mathbf {x} )\mathrm {d} \mathbf {y} \end{aligned}}}
よりSが最小になるのは、
F ( x ) = E [ y x ] {\displaystyle F(\mathbf {x} )=E[\mathbf {y} \mid \mathbf {x} ]}
の場合である。

関数 f ( x ) = E [ y | x ] {\displaystyle f(\mathbf {x} )=E[\mathbf {y} |\mathbf {x} ]} 回帰関数と呼ぶ事もある[11]

分類

(確信度ではなくクラスを直接出力するタイプの)分類タスクにおいて、0-1損失関するベイズ規則は以下のようになる:

半教師あり学習

半教師あり学習の一種は部分のデータがラベルを付き、部分のデータがラベルを付かないこと。他の状況は、学習の目標はデータのラベルよりも多い場合。例えば、画像のボックスのラベルだけで、分割の役割を果たすこと。[12]

注釈

  1. ^ 典型的には、p(x,y)に従って独立にDの各データを選ぶが、Dをどのような確率分布から選んだかによらず、定理は証明できる。

出典

  1. ^ #GBC 5.1.3節
  2. ^ #瀧 p.20.
  3. ^ a b c #ESL p11-12
  4. ^ #金森 p.3.
  5. ^ #瀧 p.8.
  6. ^ a b #瀧 p.36.
  7. ^ #瀧 p.30.
  8. ^ “Lecture 12: Bias-Variance Tradeoff”. CS4780/CS5780: Machine Learning for Intelligent Systems [FALL 2018]. コーネル大学. 2020年11月10日閲覧。
  9. ^ #金森 p.13.
  10. ^ #金森 p.9.
  11. ^ a b #ESL p22-23
  12. ^ Ulku, Irem; Akagündüz, Erdem (2022-12-31). “A Survey on Deep Learning-based Architectures for Semantic Segmentation on 2D Images” (英語). Applied Artificial Intelligence 36 (1): 2032924. doi:10.1080/08839514.2022.2032924. ISSN 0883-9514. https://www.tandfonline.com/doi/full/10.1080/08839514.2022.2032924. 

参考文献

  • Ian Goodfellow, Yoshua Bengio, Aaron Courville 翻訳:黒滝紘生, 河野慎, 味曽野雅史, 保住純, 野中尚輝, 冨山翔司, 角田貴大, 監訳:岩澤有祐, 鈴木雅大, 中山浩太郎, 松尾豊訳 (2018/8/27). 深層学習(kindle版). ドワンゴ. ASIN B07GQV1X76 
    • “Deep Learning An MIT Press book”. 2020年10月30日閲覧。同書原著のweb版
  • Hastie, Trevor、Tibshirani, Robert、Friedman, Jerome『統計的学習の基礎 データマイニング・推論・予測』杉山将、井手剛、神嶌敏弘、栗田多喜夫、前田英作、井尻善久、岩田具治、金森敬文、兼村厚範、烏山昌幸、河原吉伸、木村昭悟、小西嘉典、酒井智弥、鈴木大慈、竹内一郎、玉木徹、出口大輔、冨岡亮太、波部斉、前田新一、持橋大地、山田誠 翻訳、共立出版、2014年6月25日。ISBN 978-4320123625。 
    • “The Elements of Statistical Learning: Data Mining, Inference, and Prediction.”. スタンフォード大学. 2020年11月10日閲覧。:上述の書籍の英語版公式サイト。無料pdfあり。
  • 瀧雅人『これならわかる深層学習入門』講談社〈KS情報科学専門書 機械学習スタートアップシリーズ〉、2017年10月21日。ISBN 978-4061538283。 
  • 金森敬文『統計的学習理論』講談社〈KS情報科学専門書 機械学習スタートアップシリーズ〉、2015年8月8日。ISBN 978-4061529052。 


関連項目

スタブアイコン

この項目は、コンピュータに関連した書きかけの項目です。この項目を加筆・訂正などしてくださる協力者を求めています(PJ:コンピュータ/P:コンピュータ)。

  • 表示
  • 編集
典拠管理データベース: 国立図書館 ウィキデータを編集
  • イスラエル
  • アメリカ