<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://metabolomics.jp/mediawiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://metabolomics.jp/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Aritalab%3ALecture%2FMath%2FLR</id>
		<title>Aritalab:Lecture/Math/LR - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://metabolomics.jp/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Aritalab%3ALecture%2FMath%2FLR"/>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;action=history"/>
		<updated>2026-05-18T03:58:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.1</generator>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=314832&amp;oldid=prev</id>
		<title>Adm: /* 最小二乗法 */</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=314832&amp;oldid=prev"/>
				<updated>2016-09-08T02:45:09Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;最小二乗法&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:45, 8 September 2016&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ここでは最適パラメータを求める最小二乗法を単回帰を使って説明します。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ここでは最適パラメータを求める最小二乗法を単回帰を使って説明します。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;#160;  :&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;#160;  :&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float:right&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|y ... 目的となる変数（説明される側なので従属変数とよぶ）&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|x ... 説明に使う変数（原因となる側なので独立変数とよぶ）&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|r ... 残差　（説明しきれない部分）&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;というデータがあると仮定しましょう。y と x が与えられ、ここで決めたいのは最適な b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;, b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;#160; の値です。r は残差 (residual) といって、y&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; との差を表します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;というデータがあると仮定しましょう。y と x が与えられ、ここで決めたいのは最適な b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;, b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;#160; の値です。r は残差 (residual) といって、y と b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; との差を表します。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;最小二乗法とは残差の二乗和 S を最小化するアプローチです。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;最小二乗法とは残差の二乗和 S を最小化するアプローチです。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: S = &amp;lt;big&amp;gt;Σ&amp;lt;/big&amp;gt;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;f&lt;/del&gt;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;S の最小値を満たす b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; を求めるには、S を b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;のそれぞれで偏微分して &lt;/del&gt;0 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;とおいた連立方程式を解けばOKです。つまり&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: S = &amp;lt;big&amp;gt;Σ&amp;lt;/big&amp;gt;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;r&lt;/ins&gt;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; = &amp;lt;big&amp;gt;Σ&amp;lt;/big&amp;gt; (b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; - y&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;)&lt;/ins&gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/big&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;S &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;を b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; による二次関数とみなします。S &lt;/ins&gt;の最小値を満たす b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; を求めるには、S を b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;のそれぞれで(偏)微分して &lt;/ins&gt;0 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;とおいた連立方程式を解けばOKです。二乗の式をそのまま微分します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:∂S/∂b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; = ∑ 2( b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; - y)&amp;#160; = 0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:∂S/∂b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = ∑ 2( b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; - y) x = 0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ここから、 y = x b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; という式が出てきます。つまり、目的の&amp;#160; b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; は&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;を満たすことになります。これを行列の形に書くと&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;を満たすことになります。これを行列の形に書くと&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\mathbf{y = Xb} \quad \mathbf{y} = \begin{bmatrix} y_1\\ y_2\\ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;\vdots&amp;amp;&lt;/del&gt;\vdots\\ y_n \end{bmatrix}, \mathbf{X} = \begin{bmatrix} 1&amp;amp;x_1\\ 1&amp;amp;x_2\\ \vdots&amp;amp;\vdots\\ 1&amp;amp;x_n \end{bmatrix}, \mathbf{b} = \begin{bmatrix} b_0\\ b_1 \end{bmatrix}&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\mathbf{y = Xb} \quad \mathbf{y} = \begin{bmatrix} y_1\\ y_2\\ \vdots \\ y_n \end{bmatrix}, \mathbf{X} = \begin{bmatrix} 1&amp;amp;x_1\\ 1&amp;amp;x_2\\ \vdots&amp;amp;\vdots\\ 1&amp;amp;x_n \end{bmatrix}, \mathbf{b} = \begin{bmatrix} b_0\\ b_1 \end{bmatrix}&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;これから逆行列を用いて &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; を表せば&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;これから逆行列を用いて &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; を表せば&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;lt;b&amp;gt;b = (X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;X)&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;y&amp;lt;/b&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&amp;lt;b&amp;gt;b = (X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;X)&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;y&amp;lt;/b&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;となります。重回帰の場合も同じ式になります（行列 &lt;/del&gt;&amp;lt;b&amp;gt;X&amp;lt;/b&amp;gt; の列数が増えるだけ）。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;となります（X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;については、以下の一般逆行列の説明を参照）。重回帰の場合も同じ式になります（行列 &lt;/ins&gt;&amp;lt;b&amp;gt;X&amp;lt;/b&amp;gt; の列数が増えるだけ）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;与えられた y, x からこの式を計算するだけで自動的に b の値が求まるのです。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;与えられた y, x からこの式を計算するだけで自動的に b の値が求まるのです。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;[[Aritalab:Lecture/Math/LR/R_LM| R による実習ページ]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;[[Aritalab:Lecture/Math/LR/R_LM| R による実習ページ]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;===一般逆行列===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;すべての行列に逆行列があるわけではありません。そもそも正方（X,Y方向が同じ段数）でないと、逆行列はありません。しかし普通の行列は正方ではありません。そこで正方行列を無理やり作る方法が、自分の転置行列をかけるやり方です。 &amp;lt;b&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;X&amp;lt;/b&amp;gt; は必ず正方になります。そこで &amp;lt;b&amp;gt;y = X b&amp;lt;/b&amp;gt; の左側から &amp;lt;b&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt; をかけて&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;:&amp;lt;b&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt; y = (X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;X) b &amp;lt;/b&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;この式から b を求めることができます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===行列のランク落ち===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===行列のランク落ち===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしくなります。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしくなります。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304493&amp;oldid=prev</id>
		<title>Adm: /* 行列のランク落ち */</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304493&amp;oldid=prev"/>
				<updated>2013-06-04T07:59:40Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;行列のランク落ち&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:59, 4 June 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;の値がおかしい場合があります。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;の値がおかしくなります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304472&amp;oldid=prev</id>
		<title>Adm: /* 主成分分析 */</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304472&amp;oldid=prev"/>
				<updated>2013-06-04T01:36:39Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;主成分分析&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:36, 4 June 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしい場合があります。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしい場合があります。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;==主成分分析==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;主成分分析は行列の特異値分解を利用した手法です。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;:&amp;lt;b&amp;gt; X = U Δ V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt; = (U Δ) V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Δは対角成分に特異値が並んだ行列です。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;ここで、行列 &amp;lt;b&amp;gt;(U Δ)&amp;lt;/b&amp;gt; をスコア、&amp;lt;b&amp;gt;V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt; をローディング（固有ベクトルに対応）と呼びます。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;最も大きな固有値に対応する固有ベクトルを第一主成分といいます。第一主成分はスコア行列の第一列とローディング行列の第一行、第二主成分はスコア行列の第二列とローディング行列の第二行にあたります。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;各主成分軸は元々の説明変数を線形結合して得られますが、各軸が直交するように設定されるため共線性の問題を回避できます。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304466&amp;oldid=prev</id>
		<title>Adm at 16:11, 3 June 2013</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304466&amp;oldid=prev"/>
				<updated>2013-06-03T16:11:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:11, 3 June 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;与えられた y, x からこの式を計算するだけで自動的に b の値が求まるのです。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;与えられた y, x からこの式を計算するだけで自動的に b の値が求まるのです。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;;[[Aritalab:Lecture/Math/LR/R_LM| R による実習ページ]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;===行列のランク落ち===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です（共線性といいます）。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;このとき、逆行列の計算も上手くいかず、 &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしい場合があります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ランク落ち&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;主成分分析&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;主成分分析は行列の特異値分解を利用した手法です。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:&amp;lt;b&amp;gt; X = U Δ V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt; = (U Δ) V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;このとき、逆行列の計算が上手くいかないため、ソフトウェア等で自動的に求めると &lt;/del&gt;&amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;の値がおかしくなります。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Δは対角成分に特異値が並んだ行列です。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ここで、行列 &lt;/ins&gt;&amp;lt;b&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(U Δ)&amp;lt;/&lt;/ins&gt;b&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; をスコア、&amp;lt;b&amp;gt;V&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;&lt;/ins&gt;&amp;lt;/b&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;をローディング（固有ベクトルに対応）と呼びます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;最も大きな固有値に対応する固有ベクトルを第一主成分といいます。第一主成分はスコア行列の第一列とローディング行列の第一行、第二主成分はスコア行列の第二列とローディング行列の第二行にあたります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;各主成分軸は元々の説明変数を線形結合して得られますが、各軸が直交するように設定されるため共線性の問題を回避できます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304464&amp;oldid=prev</id>
		<title>Adm at 14:09, 3 June 2013</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304464&amp;oldid=prev"/>
				<updated>2013-06-03T14:09:39Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:09, 3 June 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==回帰分析==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==回帰分析==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析には 1 変量の単回帰 (univariate linear regression) と多変量の重回帰 (multivariate linear regression) があります。モデルしたい変量を y (目的変量）、説明に使う変量を x 、係数を b &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;で表します。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;回帰分析には 1 変量の単回帰 (univariate linear regression) と多変量の重回帰 (multivariate linear regression) があります。モデルしたい変量を y (目的変量）、説明に使う変量を x 、係数を b &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;で表します（ b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; は定数項）。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;(重)回帰モデル : y = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; + ... + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;　（つまり y を複数の変量 x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;～x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; の線形結合でモデルするやり方）&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;(重)回帰モデル : y = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; + ... + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;　（つまり y を複数の変量 x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;～x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; の線形結合でモデルするやり方）&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;y を目的変量、x を説明変量、b を回帰係数といいます。 b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; は定数項です。特に &lt;/del&gt;1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;変数の場合を単回帰モデルといいます。ここでは最適パラメータを求める最小二乗法の説明のために単回帰を使います。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;特に &lt;/ins&gt;1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;変数の場合を単回帰モデルといいます。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==最小二乗法==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ここでは最適パラメータを求める最小二乗法を単回帰を使って説明します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/ins&gt;&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:&amp;#160;  :&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: y&amp;lt;sub&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;n&lt;/ins&gt;&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;n&lt;/ins&gt;&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;というデータがあると仮定しましょう。y と x が与えられ、ここで決めたいのは最適な b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;, b&lt;/ins&gt;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; の値です。r は残差 (residual) といって、y と b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; との差を表します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;最小二乗法とは残差の二乗和 S を最小化するアプローチです。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;S = &amp;lt;big&amp;gt;Σ&amp;lt;/big&amp;gt;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; f&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;S の最小値を満たす b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; を求めるには、S を b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; と b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; のそれぞれで偏微分して 0 とおいた連立方程式を解けばOKです。つまり&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:&amp;#160;  :&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: y&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;を満たすことになります。これを行列の形に書くと&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:&amp;lt;math&amp;gt;\mathbf{y = Xb} \quad \mathbf{y} = \begin{bmatrix} y_1\\ y_2\\ \vdots&amp;amp;\vdots\\ y_n \end{bmatrix}, \mathbf{X} = \begin{bmatrix} 1&amp;amp;x_1\\ 1&amp;amp;x_2\\ \vdots&amp;amp;\vdots\\ 1&amp;amp;x_n \end{bmatrix}, \mathbf{b} = \begin{bmatrix} b_0\\ b_1 \end{bmatrix}&amp;lt;/math&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;これから逆行列を用いて &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; を表せば&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:&amp;lt;b&amp;gt;b = (X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;X)&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;X&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt;y&amp;lt;/b&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;となります。重回帰の場合も同じ式になります（行列 &amp;lt;b&amp;gt;X&amp;lt;/b&amp;gt; の列数が増えるだけ）。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;与えられた y, x からこの式を計算するだけで自動的に b の値が求まるのです。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==ランク落ち==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;というデータがあると仮定しましょう。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;線形代数における行列のランク落ちとは、線形独立な変数の数が次数より少ない状態を指します。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;回帰分析でいうと、説明変数間に非常に相関が高いものがある場合です。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;このとき、逆行列の計算が上手くいかないため、ソフトウェア等で自動的に求めると &amp;lt;b&amp;gt;b&amp;lt;/b&amp;gt; の値がおかしくなります。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	<entry>
		<id>http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304463&amp;oldid=prev</id>
		<title>Adm: Created page with &quot;==回帰分析==  回帰分析には 1 変量の単回帰 (univariate linear regression) と多変量の重回帰 (multivariate linear regression) があります。モデル...&quot;</title>
		<link rel="alternate" type="text/html" href="http://metabolomics.jp/mediawiki/index.php?title=Aritalab:Lecture/Math/LR&amp;diff=304463&amp;oldid=prev"/>
				<updated>2013-06-03T09:15:00Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==回帰分析==  回帰分析には 1 変量の単回帰 (univariate linear regression) と多変量の重回帰 (multivariate linear regression) があります。モデル...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==回帰分析==&lt;br /&gt;
&lt;br /&gt;
回帰分析には 1 変量の単回帰 (univariate linear regression) と多変量の重回帰 (multivariate linear regression) があります。モデルしたい変量を y (目的変量）、説明に使う変量を x 、係数を b で表します。&lt;br /&gt;
&lt;br /&gt;
;(重)回帰モデル : y = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; + ... + x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;　（つまり y を複数の変量 x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;～x&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; の線形結合でモデルするやり方）&lt;br /&gt;
&lt;br /&gt;
y を目的変量、x を説明変量、b を回帰係数といいます。 b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; は定数項です。特に 1 変数の場合を単回帰モデルといいます。ここでは最適パラメータを求める最小二乗法の説明のために単回帰を使います。&lt;br /&gt;
&lt;br /&gt;
: y&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
: y&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
: y&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; = b&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; + x&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; b&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + r&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
:  :&lt;br /&gt;
&lt;br /&gt;
というデータがあると仮定しましょう。&lt;/div&gt;</summary>
		<author><name>Adm</name></author>	</entry>

	</feed>