통계 에서 투영 행렬 (P ) {\displaystyle (\mathbf {P })},[1] 때로는 영향 행렬 [2] 또는 모자 행렬 (H )이라고도 하며( H ) {\displaystyle(\mathbf {H} ) 은 반응 값 (종속 변수 값)의 벡터를 적합치 (또는 예측 값)의 벡터에 매핑한다. 각 반응 값이 각 적합치에 미치는 영향 을 설명한다.[3] [4] 투영 매트릭스의 대각선 요소는 레버리지 로, 동일한 관측치에 대한 각 반응 값이 적합치에 미치는 영향을 설명한다.
정의 반응 값 의 벡터가 y {\ displaystyle \mathbf {y} 으로 표시되고 y ^ {\ displaystyle \mathbf {\hat {y}}에 의해 적합치의 벡터가 표시되는 경우, ,
y ^ = P y . {\displaystyle \mathbf {\hat {y} =\mathbf {P} \mathbf {y} .} y^ {\ displaystyle \mathbf {\hat {y}}} 이( 가) 보통 "y-hat"으로 발음되므로, 투영 행렬 P {\ displaystyle \mathbf {P}} 도 "y {\ displaysty \mathbf {y}" 에 모자 를 씌우면서 hat 행렬 로 명명된다 .
P {\ displaystyle \mathbf {P} }의 ith 행과 j번째 열에 있는 요소는 j번째 반응 값과 ith 적합치 사이 의 공분산과 동일하며 , 이를 전자의 분산 으로 나눈 값:[citation needed ]
p i j = 코브 [ y ^ i , y j ] VAR [ y j ] {\displaystyle p_{ij}={\frac {\operatorname {Cov} \left[{y}_{i}}}, y_{j}\right]{\operatorname {Var} \left[y_{j}\rig]} }} 잔차 적용 잔차 r {\ displaystyle \mathbf {r} } 의 벡터에 대한 공식도 투영 행렬을 사용하여 압축적으로 표현할 수 있다 .
r = y − y ^ = y − P y = ( I − P ) y . {\displaystyle \mathbf {r} =\mathbf {y} -\mathbf {y} -\mathbf {P} \mathbf {y} -\mathbf {I} =\lef(\mathbf {I} -\right)\mathbf {y}. 여기 서 I {\ displaystyle \mathbf {I} 은( 는) ID 행렬 이다. M ≡ I - P {\ displaystyle \mathbf {M} \equiv \mathbf {I} -\mathbf {P} 행렬을 잔차 메이커 행렬이라고 도 한다.
오류 전파 에 의한 잔차 r {\ displaystyle \mathbf {r} 의 공분산 행렬 이 동일함
Σ r = ( I − P ) T Σ ( I − P ) {\displaystyle \mathbf {\Sigma } _{\mathbf {r} }=\left(\mathbf {I} -\mathbf {P} \right)^{\textsf {T}}\mathbf {\Sigma } \left(\mathbf {I} -\mathbf {P} \right)} , 여기서 σ {\ displaystyle \mathbf {\Sigma } }은(는) 오류 벡터의 공분산 행렬(그리고 확장자로도 응답 벡터)이다 . σ = σ 2 I {\ displaystyle \mathbf {\Sigma } =\sigma ^{2}\mathbf {I}} 인 선형 모델 의 경우, [3] 이 값은 다음과 같이 감소한다.
σ r = ( I - P ) σ 2 {\ displaystyle \mathbf {\Sigma } _{\mathbf {r}}=\left(\mathbf {I} -\mathbf {P}\right)\sigma ^{2 }}.
직감 행렬 A {\ displaystyle \mathbf {A} 에는 열 공간이 녹색 선으로 표시된다 . A {\ displaystyle \mathbf {b} 의 열 공간에 대한 일부 벡터 b {\ displaystyle \mathbf {A} 의 투영은 벡터 x {\ displaystyle \mathbf {x} 이다. From the figure, it is clear that the closest point from the vector b {\displaystyle \mathbf {b} } onto the column space of A {\displaystyle \mathbf {A} } , is A x {\displaystyle \mathbf {Ax} } , and is one where we can draw a line orthogonal to the column space of A {\displaystyle \mathbf {A} } . A vector that 행렬의 열 공간에 직교하는 것은 전치 행렬의 null 공간에 있으므로
A T ( b − A x ) = 0 {\displaystyle \mathbf {A}^{\textsf {T}(\mathbf {b} -\mathbf {Ax} )=0} 거기서부터 한 척의 백랑이, 그러니까.
A T b − A T A x = 0 ⇒ A T b = A T A x ⇒ x = ( A T A ) − 1 A T b {\displaystyle{\begin{정렬}&,&\mathbf{A}^{\textsf{T}}{b}및 \mathbf, -\mathbf{A}^{\textsf{T}}{도끼를}=0\\\Rightarrow 및 \mathbf,&\mathbf{A}^{\textsf{T}}{b}및 \mathbf, =\mathbf{A}^{\textsf{T}}{도끼를}\\\Rightarrow 및 \mathbf,&\mathbf{)}&=\left(\mathbf{A}^{\textsf{T}}\mathbf{A}\right)^{)}\mathbf{A}^{\text.sf{T}}}{b}\end{정렬}\mathbf} Therefore, since x {\displaystyle \mathbf {x} } is on the column space of A {\displaystyle \mathbf {A} } , the projection matrix, which maps b {\displaystyle \mathbf {b} } onto x {\displaystyle \mathbf {x} } is just A x {\displaystyle \mathbf {Ax} } , or A ( A T A ) − 1 A T b {\ displaystyle \mathbf {A} \left(\mathbf {A} ^{\textsf {T}\mathbf {A} \right)^{-1}\mathbf {A} ^{\textsf {T}\mathbf {b}}}}}}}}}}}}}}}}}}}}}}}}}
선형 모형 선형 최소 제곱을 사용하여 선형 모형을 추정한다고 가정합시다. 모델은 다음과 같이 쓸 수 있다.
y = X β + ε , {\displaystyle \mathbf {y} =\mathbf {X} {\boldsymbol {\beta }+{\boldsymbol {\barepsilon},} 여기서 X {\ displaystyle \mathbf {X} 은( 는) 설명 변수 의 행렬(설계 행렬 ), β는 추정 할 알 수 없는 모수의 벡터, ε은 오차 벡터다.
많은 유형의 모델과 기법은 이 공식에 따른다. 선형 최소 제곱 , 평활 스플라인 , 회귀 스플라인 , 로컬 회귀 분석, 커널 회귀 분석 및 선형 필터링 등이 몇 가지 예다.
보통 최소 제곱 각 관측치의 가중치가 동일하고 오차 가 상관관계가 없을 때 추정된 모수는 다음과 같다.
β ^ = ( X T X ) − 1 X T y , {\displaystyle {\boldsymbol {\beta}}=\왼쪽(\mathbf {X}) ^{\textsf {T}\x}^{-1}\mathbf {X}^{\textsf {T}\mathbf {y},},},}} 적합치는 다음과 같다.
y ^ = X β ^ = X ( X T X ) − 1 X T y . {\displaystyle {\hat {\mathbf {y} }}=\mathbf {X} {\hat {\boldsymbol {\beta }}}=\mathbf {X} \left(\mathbf {X} ^{\textsf {T}}\mathbf {X} \right)^{-1}\mathbf {X} ^{\textsf {T}}\mathbf {y} .} 따라서 투영 매트릭스(및 hat 매트릭스)는 다음에 의해 주어진다.
P ≡ X ( X T X ) − 1 X T . {\displaystyle \mathbf {P} \equiv \mathbf {X} \좌(\mathbf {X}) ^{\textsf {T}\mathbf {X}^{-1}\mathbf {X} ^{\textsf {T}}}. } 가중 및 일반화 최소 제곱 위 사항은 가중치가 동일하지 않거나 오차가 상관관계가 있는 경우로 일반화할 수 있다. 오차의 공분산 행렬 이 σ 이라고 가정합시다. 그 후
β ^ GLS = ( X T σ - 1 X ) - 1 X T σ - 1 y {\ displaystyle {\hat {\mathbf {\beta}}}}{\text{ GLS}}=\left(\mathbf {X} ^{\textsf {T}}\mathbf {\Sigma } ^{-1}\mathbf {X} \right)^{-1}\mathbf {X} ^{\textsf {T}}\mathbf {\Sigma } ^{-1}\mathbf {y} } . 모자 행렬은 다음과 같다.
H = X ( X T Σ − 1 X ) − 1 X T Σ − 1 {\displaystyle \mathbf {H} =\mathbf {X} \left(\mathbf {X} ^{\textsf {T}}\mathbf {\Sigma } ^{-1}\mathbf {X} \right)^{-1}\mathbf {X} ^{\textsf {T}}\mathbf {\Sigma } ^{-1}} 그리고 지금은 더 이상 대칭이 아니지만 H 2 = H { H = H {\displaystyle H^{2}=H\cdot H=H} 라고 볼 수 있다.
특성. 투영 매트릭스에는 여러 가지 유용한 대수적 특성이 있다.[5] [6] 선형 대수학의 언어로 설계 매트릭스 X{\displaystyle \mathbf{X}의 세로 줄 공간에 프로젝션 행렬은 정사영}}}은 pseudoi(그(XTX습니다)− 1XT{\displaystyle \left(\mathbf{X}^{\textsf{T}}\mathbf{X}\right)^{)}\mathbf{X}^{\textsf{T}.[4].nv X .) 이 설정에서 투영 행렬의 일부 사실은 다음과 같이 요약된다.[4]
u = ( I − P ) y , {\displaystyle \mathbf {u} =(\mathbf {I} -\mathbf {P} )\mathbf {y} ,} and u = y − P y ⊥ X . {\displaystyle \mathbf {u} =\mathbf {y} -\mathbf {P} \mathbf {y} \perp \mathbf {X} .} P {\ displaystyle \mathbf {P}} 은(는) 대칭이며 , M ≡ I - P {\ displaystyle \mathbf {M} \equiv \mathbf {I} -\mathbf {P} } 도 대칭이다. P {\ displaystyle \mathbf {P} } 은 (는) idempotent: P 2 = P {\displaystyle \mathbf {P} ^{2}=\mathbf {P} }이고, M {\ displaysty \mathbf {M} }도 마찬가지 입니다. X {\ displaystyle \ mathbf {X}} 이 (가) 랭크 ( X ) = r {\displaystyle \operatorname {rank }(\mathbf {X} )인 경우 , 랭크 ( P ) = r {\displaysty \operatorname {rank}(\mathbf {P})=r}). P {\ displaystyle \mathbf {P} 의 고유값 은 r 1과 n - r 0 으로 구성되며 , M {\ displaystyle \mathbf {M}} 의 고유값은 n - r 1 과 r 0 으로 구성된다 .[7] X {\displaystyle \mathbf {X} } is invariant under P {\displaystyle \mathbf {P} } : P X = X , {\displaystyle \mathbf {PX} =\mathbf {X} ,} hence ( I − P ) X = 0 {\displaystyle \left(\mathbf {I} -\mathbf {P} \right)\mathbf {X} =\mathbf {0} } . ( I − P ) P = P ( I − P ) = 0 . {\displaystyle \left(\mathbf {I} -\mathbf {P} \right)\mathbf {P} \left(\mathbf {I} -\mathbf {P} \right)=\mathbf {0}.} P {\ displaystyle \mathbf {P} } 은 (는) 특정 하위 공간에 대해 고유하다. 선형 모형 에 해당하는 투영 행렬은 대칭 및 idempotent , 즉 P 2 = P {\ displaystyle \mathbf {P}^{2}=\mathbf {P }}}}. 그러나 국소 가중 산점도 평활(LOESS) 에서는 모자 행렬이 일반적으로 대칭이나 idempotentent가 아니다.
선형 모형 의 경우 투영 행렬 의 트레이스는 선형 모형의 독립 매개변수 수인 X {\ displaystyle \mathbf {X} 의 순위 와 동일하다. [8] 관측치 y {\ displaystyle \mathbf {y} 에서 여전히 선형인 LOESS와 같은 다른 모델의 경우 투영 행렬을 사용하여 모델의 유효 자유도 를 정의할 수 있다.
회귀 분석에서 투영 행렬의 실제 적용은 레버리지 와 Cook 의 거리를 포함하며, 영향력 있는 관측치, 즉 회귀 분석 결과에 큰 영향을 미치는 관측치를 식별하는 것과 관련이 있다.
블럭화 공식 설계 행렬 X {\displaystyle X} 을(를) X = [ A B ] {\ displaystyle X={\begin{bmatrix}A& 로 분해할 수 있다고 가정하십시오. B\end{bmatrix}}} . Define the hat or projection operator as P { X } = X ( X T X ) − 1 X T {\displaystyle P\{X\}=X\left(X^{\textsf {T}}X\right)^{-1}X^{\textsf {T}}} . Similarly, define the residual operator as M { X } = I − P { X } {\displaystyle M\{X\}=I-P\{X\}} . Then the projection matrix can be decomposed as follows:[9]
P { X } = P { A } + P { M { A } B } , P\{X\}=P\{displaystyle P\} A\}+P\{M\ {A\}B\}} where, e.g., P { A } = A ( A T A ) − 1 A T {\displaystyle P\{A\}=A\left(A^{\textsf {T}}A\right)^{-1}A^{\textsf {T}}} and M { A } = I − P { A } {\displaystyle M\{A\}=I-P\{ A \}} 그런 분해에는 여러 가지 응용이 있다. 고전적 어플리케이션 A {\displaystyle A} 은 모든 어플리케이션의 컬럼으로, 회귀에 절편 용어를 추가하는 효과를 분석할 수 있다. 또 다른 용도는 고정 효과 모델 에서 사용되며, 여기 서 A {\displaystyle A} 은 고정 효과 항에 대한 더미 변수의 큰 희소 행렬 이다 . 너무 커서 컴퓨터 메모리에 맞지 않을 수 있는 행렬 X {\displaystyle X } 을(를) 명시적으로 구성하지 않고도 이 파티션을 사용하여 X {\displaystyle X } 의 모자 행렬을 계산할 수 있다.
참고 항목 참조 ^ Basilevsky, Alexander (2005). Applied Matrix Algebra in the Statistical Sciences . Dover. pp. 160–176. ISBN 0-486-44538-0 . ^ "Data Assimilation: Observation influence diagnostic of a data assimilation system" (PDF) . Archived from the original (PDF) on 2014-09-03. ^ a b Hoaglin, David C.; Welsch, Roy E. (February 1978). "The Hat Matrix in Regression and ANOVA" (PDF) . The American Statistician . 32 (1): 17–22. doi :10.2307/2683469 . hdl :1721.1/1920 . JSTOR 2683469 . ^ a b c David A. Freedman (2009). Statistical Models: Theory and Practice . Cambridge University Press . ^ Gans, P. (1992). Data Fitting in the Chemical Sciences . Wiley. ISBN 0-471-93412-7 . ^ Draper, N. R.; Smith, H. (1998). Applied Regression Analysis . Wiley. ISBN 0-471-17082-8 . ^ Amemiya, Takeshi (1985). Advanced Econometrics . Cambridge: Harvard University Press. pp. 460 –461. ISBN 0-674-00560-0 . ^ "Proof that trace of 'hat' matrix in linear regression is rank of X" . Stack Exchange . April 13, 2017. ^ Rao, C. Radhakrishna; Toutenburg, Helge; Shalabh; Heumann, Christian (2008). Linear Models and Generalizations (3rd ed.). Berlin: Springer. pp. 323 . ISBN 978-3-540-74226-5 .