<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>情報工学とその周辺 &#187; PRML</title>
	<atom:link href="http://eisukeito.com/blog/?cat=3&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://eisukeito.com/blog</link>
	<description>Connecting dots.</description>
	<lastBuildDate>Sat, 28 Dec 2013 13:56:12 +0000</lastBuildDate>
	<language>ja</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.8.41</generator>
	<item>
		<title>[PRML] 1.1 多項式曲線フィッティング (2)</title>
		<link>http://eisukeito.com/blog/?p=95</link>
		<comments>http://eisukeito.com/blog/?p=95#comments</comments>
		<pubDate>Thu, 27 Dec 2012 22:20:30 +0000</pubDate>
		<dc:creator><![CDATA[eisuke]]></dc:creator>
				<category><![CDATA[PRML]]></category>

		<guid isPermaLink="false">http://eisukeito.com/blog/?p=95</guid>
		<description><![CDATA[次数 の決め方 次に、多項式の次数 は、どう選べばよいのでしょうか。 この問題はモデル選択(model selection)と呼ばれています。 それでは、実際に の値をいろいろと変えてみたものを見てみましょう。 (図　作 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> の決め方</strong><br />
次に、多項式の次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> は、どう選べばよいのでしょうか。<br />
この問題は<strong>モデル選択</strong>(model selection)と呼ばれています。</p>
<p>それでは、実際に <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> の値をいろいろと変えてみたものを見てみましょう。</p>
<p>(図　作成中)</p>
<p>次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> が小さすぎる場合、ほとんどの訓練データへの当てはまりが悪いのが分かります。<br />
反対に、次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> が大きすぎる場合、訓練データへの当てはまりが非常に良くなっています。例えば、次数 <img src='http://s.wordpress.com/latex.php?latex=M%20%3D%209&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M = 9' title='M = 9' class='latex' /> の例では、<img src='http://s.wordpress.com/latex.php?latex=E%28%7B%5Cmathbf%20w%7D%5E%2A%29%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E({\mathbf w}^*) = 0' title='E({\mathbf w}^*) = 0' class='latex' /> となっていて、誤差が無い状態です。</p>
<p>では <img src='http://s.wordpress.com/latex.php?latex=M%20%3D%209&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M = 9' title='M = 9' class='latex' /> の場合が一番良いのでしょうか。</p>
<p>そうではなさそうですよね。<br />
関数の形が発振したようにぐにゃぐにゃになってしまっています。<br />
このような状態では、<strong>訓練データに対する当てはまりが良すぎて、新しいデータ、つまりテストデータに対しては、うまく目標値を予測することができません</strong>。<br />
この状態を、<strong>過学習</strong>(over-fitting)とよびます。</p>
<p>では、よい次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> はどうやって選べばよいのでしょうか。</p>
<p>&#8230;答えは単純です。</p>
<p>いろいろとMを変えてみて、それぞれについて誤差 <img src='http://s.wordpress.com/latex.php?latex=E%28%7B%5Cmathbf%20w%7D%5E%2A%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E({\mathbf w}^*)' title='E({\mathbf w}^*)' class='latex' /> を求め、比較すればいいのです。</p>
<p>実際には、<strong>平均二乗平方根誤差</strong>(RMS error, root-mean-square error)という指標を使います。</p>
<p><img src='http://s.wordpress.com/latex.php?latex=E_%7BRMS%7D%20%3D%20%5Csqrt%7B%5Cfrac%7B2E%28%7B%5Cmathbf%20w%7D%5E%2A%29%7D%7BN%7D%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E_{RMS} = \sqrt{\frac{2E({\mathbf w}^*)}{N}}' title='E_{RMS} = \sqrt{\frac{2E({\mathbf w}^*)}{N}}' class='latex' /><br />
<br />
この指標は、</p>
<ul>
<li>データ数 <img src='http://s.wordpress.com/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' /> で誤差関数を割っているため、異なるデータ数をもつデータに有効</li>
<li>平方根をとっているため、目標値 <img src='http://s.wordpress.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='t' title='t' class='latex' /> と単位が揃う
</ul>
<p>というメリットがあります。</p>
<p>次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> の場合の、<img src='http://s.wordpress.com/latex.php?latex=E%28%7B%5Cmathbf%20w%7D%5E%2A%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E({\mathbf w}^*)' title='E({\mathbf w}^*)' class='latex' /> を訓練集合とテスト集合それぞれについて調べてみると、以下のような結果になりました。</p>
<p>(図　作成中)</p>
<p>次数が高い多項式は次数が低い多項式を特殊な場合として含むので、次数が高くなるにつれてよいモデルになりそうですが、結果は異なります。<br />
これは多項式の次数が高すぎると、データに含まれるノイズに敏感になってしまうためと考えることができます。</p>
<p><strong>データ集合のサイズを大きくする</strong></p>
<p>今度は、次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> を固定したうえで、データ集合 <img src='http://s.wordpress.com/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' /> のサイズを変えてみましょう。</p>
<p>(図 作成中)</p>
<p>どうでしょうか。</p>
<p>先ほど問題になっていた複雑な多項式モデル <img src='http://s.wordpress.com/latex.php?latex=M%20%3D%209&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M = 9' title='M = 9' class='latex' /> ですが、データ数 <img src='http://s.wordpress.com/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' /> が増えたことで過学習が緩和されていることが分かります。</p>
<p>訓練データの数が大きくなると、より複雑なモデルをデータに当てはめることができます。</p>
<p>この議論で行くと、入手できる訓練データの数によって、モデルの複雑さ(この場合の次数 <img src='http://s.wordpress.com/latex.php?latex=M&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='M' title='M' class='latex' /> )を選ばなくてはならなくなってしまうので、違和感があります。</p>
<p><strong>限られたサイズの訓練データに対して複雑で柔軟なモデルを使うことができるようにする</strong>ために、<strong>正則化</strong>(regularization)というテクニックがあります。</p>
]]></content:encoded>
			<wfw:commentRss>http://eisukeito.com/blog/?feed=rss2&#038;p=95</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PRML] 1. データに潜むパターンを見つけ出す。</title>
		<link>http://eisukeito.com/blog/?p=13</link>
		<comments>http://eisukeito.com/blog/?p=13#comments</comments>
		<pubDate>Tue, 25 Dec 2012 18:34:55 +0000</pubDate>
		<dc:creator><![CDATA[eisuke]]></dc:creator>
				<category><![CDATA[PRML]]></category>

		<guid isPermaLink="false">http://eisukeito.com/blog/?p=13</guid>
		<description><![CDATA[パターン認識という学問 計算機アルゴリズムを通じて、データの中の規則性を自動的に見つけ出し、さらにその規則性を使ってデータを異なるカテゴリに分類する、というデータ処理を行う 素直な方法 人力による識別ルールの作成 ヒュー [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>パターン認識という学問</strong></p>
<blockquote><p>計算機アルゴリズムを通じて、データの中の規則性を自動的に見つけ出し、さらにその規則性を使ってデータを異なるカテゴリに分類する、というデータ処理を行う</p></blockquote>
<p><strong>素直な方法</strong></p>
<ul>
<li>人力による識別ルールの作成</li>
<li>ヒューリスティクスを編み出す</li>
</ul>
<p>ただし、こういった方法ではあらかじめ作らなくてはいけないルールの数を爆発的に増やさなくてはならなかったり、例外が起きたときのルールも爆発的に増えてしまいます。</p>
<p><strong>パターン認識での方法</strong></p>
<ul>
<li>訓練集合(training set) <img src='http://s.wordpress.com/latex.php?latex=%5C%7B%7B%5Cmathbf%20x%7D_1%2C%5Cldots%2C%20%7B%5Cmathbf%20x%7D_N%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\{{\mathbf x}_1,\ldots, {\mathbf x}_N\}' title='\{{\mathbf x}_1,\ldots, {\mathbf x}_N\}' class='latex' /> の入力 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x_i%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x_i}' title='{\mathbf x_i}' class='latex' /> により関数のパラメータを更新し、出力(target vector) <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t_i%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t_i}' title='{\mathbf t_i}' class='latex' /> となるような関数 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t%7D%20%3D%20y%28%7B%5Cmathbf%20x%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t} = y({\mathbf x})' title='{\mathbf t} = y({\mathbf x})' class='latex' /> を作る</li>
<li>テスト集合(test set)の入力 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x%7D_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x}_j' title='{\mathbf x}_j' class='latex' /> に対して出力 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t%7D_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t}_j' title='{\mathbf t}_j' class='latex' />  が予測(prediction)できるようになる</li>
</ul>
<p><strong>処理の手順</strong></p>
<ol>
<li>入力データに対する前処理(preprocessing)あるいは特徴抽出(feature extraction)を行う(次元削減とか)</li>
<li>訓練集合の入力 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x}' title='{\mathbf x}' class='latex' /> と目標ベクトル <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t}' title='{\mathbf t}' class='latex' /> を対応付ける関数 <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' /> の導出</li>
<li>関数 <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' /> によりテスト集合 <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x%27%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x&#039;}' title='{\mathbf x&#039;}' class='latex' /> の目標ベクトル <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t%27%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t&#039;}' title='{\mathbf t&#039;}' class='latex' /> を予測</li>
</ol>
<p><strong>パターン認識の扱う問題の種類</strong><br />
大きく分けて</p>
<ol>
<li>教師あり学習(supervised learning)：訓練データが、入力ベクトル <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x}' title='{\mathbf x}' class='latex' /> と目標ベクトル <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20t%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf t}' title='{\mathbf t}' class='latex' /> の事例で構成される場合</li>
<li>教師なし学習(unsupervised learning)：訓練データが、入力ベクトル <img src='http://s.wordpress.com/latex.php?latex=%7B%5Cmathbf%20x%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{\mathbf x}' title='{\mathbf x}' class='latex' /> のみで構成される(それらに対応する目標ベクトルが存在しない)場合</li>
</ol>
<p>に分けることができます。<br />
このほかに</p>
<ul>
<li>半教師あり学習(semi-supervised learning)：訓練データの中に、目標ベクトルがない事例も含まれる場合</li>
<li>強化学習(reinforcement learning)：最適な出力は事例として与えられず、与えられた状況下で、報酬を最大化するように学習を行う場合</li>
</ul>
<p>などもあります。</p>
<p><strong>教師あり学習</strong><br />
教師あり学習には、大きく分けて2つの場合があり、</p>
<ol>
<li>クラス分類(classification)：各入力ベクトルを離散カテゴリの一つに割り当てる場合</li>
<li>回帰(regression)：各入力ベクトルに対し、一つあるいは複数の連続値を与える場合</li>
</ol>
<p><strong>教師なし学習<br />
</strong>教師なし学習には</p>
<ul>
<li>クラスタリング(clustering)：類似した事例のグループを見つけること</li>
<li>密度推定(density estimation)：入力空間におけるデータの分布を求めること</li>
</ul>
<p>などがあります。</p>
<p><strong>パターン認識を学ぶのに必要な知識</strong></p>
<ul>
<li>微分積分学</li>
<li>線形代数学</li>
</ul>
<p>は基本として、</p>
<ul>
<li>確率論</li>
<li>決定理論</li>
<li>情報理論</li>
</ul>
<p>の知識が必須です。</p>
<p>(言葉だけだと分かりづらいので、図とかTeXとかで更新予定です)</p>
]]></content:encoded>
			<wfw:commentRss>http://eisukeito.com/blog/?feed=rss2&#038;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
