Site Tools


notes:dan:contrast-matrix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:dan:contrast-matrix [2022/03/20 08:07] โ€“ cjjnotes:dan:contrast-matrix [2022/03/20 08:37] (current) โ€“ cjj
Line 31: Line 31:
 \begin{eqnarray*} \begin{eqnarray*}
 \mathrm{Err}_{\mathrm{restr}} & = & \mathbf{r}_{\mathrm{restr}}^{T}\mathbf{r}_{\mathrm{restr}}\\ \mathrm{Err}_{\mathrm{restr}} & = & \mathbf{r}_{\mathrm{restr}}^{T}\mathbf{r}_{\mathrm{restr}}\\
- & = & \mathbf{r}_{\mathrm{full}}^{T}\mathbf{r}_{\mathrm{full}}+\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)^{T}\mathbf{X}^{T}\mathbf{X}\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)\\ย + & = & \mathbf{r}_{\mathrm{full}}^{T}\mathbf{r}_{\mathrm{full}}+\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)^{T}\color{#00a}{\mathbf{X}^{T}\mathbf{X}\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)}\\ย 
- & = & \mathrm{Err}_{\mathrm{full}}+\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)^{T}\mathbf{L}^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)\\ย + & = & \mathrm{Err}_{\mathrm{full}}+\color{#800}{\left(\widehat{๐›ƒ}-๐›ƒ_{0}\right)^{T}}\color{#00a}{\mathbf{L}^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)}\\ย 
- & = & \mathrm{Err}_{\mathrm{full}}+\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\\ย + & = & \mathrm{Err}_{\mathrm{full}}+\color{#800}{\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}}\\ย 
- & & \times\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)\\+ & & \times\mathbf{L}^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)\\
  & = & \mathrm{Err}_{\mathrm{full}}+\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)  & = & \mathrm{Err}_{\mathrm{full}}+\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐›ƒ}-\mathbf{c}\right)
 \end{eqnarray*} \end{eqnarray*}
 where the cross terms vanish since $ \mathbf{X}^{T}\mathbf{r}_{\mathrm{full}} = 0 $ by the condition of the full model, and we observe that $ \mathbf{X}^{T}\mathbf{X} $ and $ \mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T} $ are both symmetric matrices. where the cross terms vanish since $ \mathbf{X}^{T}\mathbf{r}_{\mathrm{full}} = 0 $ by the condition of the full model, and we observe that $ \mathbf{X}^{T}\mathbf{X} $ and $ \mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T} $ are both symmetric matrices.
notes/dan/contrast-matrix.1647763621.txt.gz ยท Last modified: 2022/03/20 08:07 by cjj