File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292
9393 が損失関数となる.なお,目的とする関数の値域により適切な活性化関数を選定する必要がある.例えば,目的とする関数の値域が :math: `[-1 ,1 ]` であればtanh関数,任意の実数 :math: `(-\infty , \infty )` であれば恒等関数が適切である.
9494
95+ 2値分類は,入力 :math: `\mathbf {x}` を2つのクラスのいずれかに割り当てる問題である.クラスラベルを :math: `k\in \{ 0 ,1 \}` とすると,入力 :math: `\mathbf {x}` がクラス :math: `1 ` に属する事後確率 :math: `p(k=1 |\mathbf {x})` をネットワークの出力として表すことができる.
96+
97+ .. math ::
98+
99+ p(k=1 |\mathbf {x}) = y(\mathbf {x}; \mathbf {w})
100+
101+ このモデルが訓練データ :math: `\{(\mathbf {x}_n, d_n)\} _{n=1 }^N` を最もよく整合するようにパラメータ :math: `\mathbf {w}` を定めるには,最尤推定を用いればよい.すなわち,訓練データに対する :math: `\mathbf {w}` の尤度
102+
103+ .. math ::
104+
105+ \mathcal {L}(\mathbf {w}) = \prod _{n=1 }^N p(d_n|\mathbf {x}_n; \mathbf {w}) = \prod _{n=1 }^N y(\mathbf {x}_n; \mathbf {w})^{d_n} (1 - y(\mathbf {x}_n; \mathbf {w}))^{1 -d_n}
106+
107+ を最大化すればよい.この尤度の対数をとり,符号を反転させると,損失関数
108+
109+ .. math ::
110+
111+ \mathcal {E}(\mathbf {w}) = -\sum _{n=1 }^N \{ d_n \log y(\mathbf {x}_n; \mathbf {w}) + (1 -d_n) \log (1 - y(\mathbf {x}_n; \mathbf {w}))\}
112+
113+ となる.これは,対数関数が単調増加であるため,尤度を最大化することと対数尤度を最大化することが同値であり,損失関数としてはその負値を最小化すればよいからである.
114+
You can’t perform that action at this time.
0 commit comments