LoginSignup
0
0

More than 3 years have passed since last update.

PRML 演習問題6.7(基本) 解答

Last updated at Posted at 2020-07-23

はじめに

本記事は, 機械学習の教科書の決定版ともいえる, Christopher Bishop先生による『Pattern Recognition and Machine Learning (パターン認識と機械学習)』, 通称PRMLの演習問題のうち, 私が解いた問題の解答を記したものです

今回は演習問題6.7の解説です

問題

以下の二つが有効なカーネルであることを示します

\begin{aligned}
k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) &=k_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)+k_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)\quad(\text { 6.17 }) \\ \\

k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) &=k_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) k_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)\quad(\text { 6.18 }) \\
\end{aligned}

つまり、カーネル同士の足し算と掛け算です

前提

k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)

で定義されるカーネル関数が有効であるということは

k\left(\mathbf{x}_{n}, \mathbf{x}_{m}\right)

で与えられるグラム行列$\mathbf{K}$が任意のベクター$\mathbf{a}$について

\mathbf{a}^{\mathrm{T}} \mathbf{K a} \geqslant 0

となることが必要十分条件です。
これによってカーネル関数が有効か確かめることができます

解答

6.17は有効であるかを簡単に確かめることができます

\mathbf{a}^{\mathrm{T}} \mathbf{K a} \geqslant 0

を前提に、半正定置のものを足し合わせるとやはり半正定置となることから明らかに

\mathbf{a}^{\mathrm{T}}\left(\mathbf{K}_{1}+\mathbf{K}_{2}\right) \mathbf{a}=\mathbf{a}^{\mathrm{T}} \mathbf{K}_{1} \mathbf{a}+\mathbf{a}^{\mathrm{T}} \mathbf{K}_{2} \mathbf{a} \geqslant 0

とかけるので、(6.17)が有効であることが示されます


(6.18)を考えるために、カーネル関数が有効であるとき、以下のような写像$\phi$,$\psi$を考えることができたことを思い出します(教科書と演習6.5を参考)

k_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)=\phi(\mathbf{x})^{\mathrm{T}} \boldsymbol{\phi}\left(\mathbf{x}^{\prime}\right)
k_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)=\boldsymbol{\psi}(\mathbf{x})^{\mathrm{T}} \boldsymbol{\psi}\left(\mathbf{x}^{\prime}\right)

これを用いて(6.18)を変形すると

\begin{aligned}
k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) &=k_{1}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) k_{2}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
&=\phi(\mathbf{x})^{\mathrm{T}} \phi\left(\mathbf{x}^{\prime}\right) \psi(\mathbf{x})^{\mathrm{T}} \psi\left(\mathbf{x}^{\prime}\right) \\
&=\sum_{m=1}^{M} \phi_{m}(\mathbf{x}) \phi_{m}\left(\mathbf{x}^{\prime}\right) \sum_{n=1}^{N} \psi_{n}(\mathbf{x}) \psi_{n}\left(\mathbf{x}^{\prime}\right) \\
&=\sum_{m=1}^{M} \sum_{n=1}^{N} \phi_{m}(\mathbf{x}) \phi_{m}\left(\mathbf{x}^{\prime}\right) \psi_{n}(\mathbf{x}) \psi_{n}\left(\mathbf{x}^{\prime}\right) \\
&=\sum_{k=1}^{K} \varphi_{k}(\mathbf{x}) \varphi_{k}\left(\mathbf{x}^{\prime}\right) \\
&=\varphi(\mathbf{x})^{\mathrm{T}} \varphi\left(\mathbf{x}^{\prime}\right)
\end{aligned}

ここで $K=M N$ であり$\phi_{k}$とは以下の式で与えられるものであるとしています

\varphi_{k}(\mathbf{x})=\phi_{((k-1) \oslash N)+1}(\mathbf{x}) \psi_{((k-1) \odot N)+1}(\mathbf{x})

$\oslash$ 整数部 $\odot$ 余剰部

よって(6.18)も示されました

参考
PRML公式解答(Solutions to Exercises Web-Edition)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0