最小二乗法 の基本
Basics of the least squares method
1導入 どうにゅう
この
が
1Introduction
The key point of this lecture is that the
The equation has a solution exactly when lies in . In applications, measured data often put slightly outside the
2用語 ようご と定義 ていぎ
を
で
と
を
2Terms and definitions
over .
The
For real matrices, the
In the complex case, is replaced by the
3方針 ほうしん
は の
3Plan
Since always lies in , minimizing means projecting onto that
4直感的 ちょっかんてき な説明 せつめい
この
なぜ
という
4Intuitive explanation
Think of the
The reason we project onto the
At the closest point , the residual has no component along the
5厳密 げんみつ な説明 せつめい
5.11. 列空間 れつくうかん column space への射影 しゃえい projection
の
したがって
は
5.22. 直交条件 ちょっこうじょうけん から正規方程式 せいきほうていしき へ
の
である。これは
と
すなわち
を
すなわち
を
5.33. 一意性 いちいせい
の
で
5.44. 射影行列 しゃえいぎょうれつ
が
で
であり、 が の
が
を
5Precise explanation
5.11. Projection onto the column space 列空間 れつくうかん
For a least squares solution, is the
is orthogonal to every column of .
5.22. From orthogonality to normal equations 正規方程式 せいきほうていしき
Let the columns of be . The condition
is written in matrix form as
in the real case. Substituting gives
so
In the complex case, the same orthogonality condition is written as , hence
5.33. Uniqueness
If the columns of are linearly independent, then is
If the columns are linearly dependent, the projection is still unique, but the coefficient vector may not be unique. The
5.44. Projection matrix
If has full column
Then
The matrix satisfies
In the complex case,
6具体例 ぐたいれい
とする。 は
すなわち
である。したがって となる。これは の
と
であり、
を
であり、
6Concrete examples
For
the vector has all entries equal to . The normal equation is
so . This is the average of and is the best constant approximation.
For a line fit through using , write
Then
Solving gives
The best-fit line is
and the residual is orthogonal to both columns of .
7別 べつ の観点 かんてん
8定理 ていり :存在 そんざい と射影 しゃえい による特徴 とくちょう づけ
と に
が
と
である。
9階数 かいすう rank が落 お ちる場合 ばあい と最小 さいしょう ノルム解 かい
の
7Another viewpoint
Geometrically, the
8Theorem: existence and projection characterization
For every and , a minimizer of exists. The minimizing vector may not be unique, but the best approximation is unique and equals the
Indeed, since is finite-dimensional, we can decompose
Choose such that . For any ,
This proof shows that least squares is fundamentally an orthogonal-decomposition argument.
9rank 階数 かいすう -deficient case and least-norm solutions
If the columns of are dependent, is not
10数値計算上 すうちけいさんじょう の注意 ちゅうい
10Numerical warning
The
11判定基準 はんていきじゅん
- が
過剰 かじょう な条件 じょうけん を持 も ち、厳密解 げんみつかい が存在 そんざい しない場合 ばあい は最小二乗法 さいしょうにじょうほう least squares method を検討 けんとう する。 列空間 れつくうかん column space への最近点 さいきんてん を求 もと める問題 もんだい では、残差 ざんさ の直交条件 ちょっこうじょうけん を立式 りっしき する。列 れつ column が一次独立 いちじどくりつ linear independence なら の可逆性 かぎゃくせい を利用 りよう する。列 れつ column が一次従属 いちじじゅうぞく linear dependence なら、一意 いちい な射影 しゃえい と非一意 ひいちい になりうる係数ベクトル coefficient vector を区別 くべつ する。
11Criteria
- Use least squares when is overdetermined or inconsistent.
- The residual must be orthogonal to the
column space .列空間 れつくうかん - If the columns of are independent, use the invertibility of .
- If the columns are dependent, distinguish the unique projection from nonunique coefficient vectors.
12どこまで成立 せいりつ するか
12Scope and limitations
In real standard inner products, use . In complex spaces, use . When the columns are dependent, the projection is unique but the coefficients need not be. Numerical algorithms often avoid explicitly forming .
13定理 ていり :最小二乗解 さいしょうにじょうかい の存在 そんざい と直交射影 ちょっこうしゃえい
と に
と
である。ここで と を
14階数落 かいすうお ちの場合 ばあい と最小 さいしょう ノルム解 かい
の
は
15計算例 けいさんれい :2 変数 へんすう の直線近似 ちょくせんきんじ
である。
より
これを
である。したがって
である。
16数値計算 すうちけいさん での実務的 じつむてき な注意 ちゅうい
を
17最終形 さいしゅうけい
13Theorem: existence of least-squares solutions and orthogonal projection
For and , a vector minimizing always exists. However, need not be unique. The unique object is the best approximation , namely the
The reason is that is a finite-dimensional
Choose with . For any ,
Here and are used. This proof shows that least squares is based on
14rank 階数 かいすう -deficient case and least-norm solutions
If the columns of are
may have multiple solutions. Those solutions give the same , and their differences lie in . To select a unique representative, choose the least-norm solution with no component in the direction. The
15Calculation example: fitting a line with two variables
Approximate the points by . In matrix form,
The normal equations are
so
Solving gives
Thus the best-fitting line is
The residual is
16Practical numerical warning
Forming roughly squares the condition number. Thus even if is only moderately ill-conditioned, can become much more unstable. Normal equations show the theoretical structure, but in numerical computation QR decomposition or
17Final forms
18一言 ひとこと でいうと
最小二乗法 さいしょうにじょうほう least squares method は、 を列空間 れつくうかん column space へ直交射影 ちょっこうしゃえい orthogonal projection し、残差 ざんさ を列空間 れつくうかん column space に直交 ちょっこう orthogonal させる方法 ほうほう である。
18In one sentence
The