Added material to slides

This commit is contained in:
mhjensen
2019-09-05 13:42:18 +02:00
parent f56c59cf34
commit 05c0090fd8
9 changed files with 36 additions and 6 deletions
+6 -1
View File
@@ -1590,9 +1590,14 @@ def SVDinv(A):
numpy and scipy.linalg at the cost of being slower.
'''
U, s, VT = np.linalg.svd(A)
# print('test U')
# print( (np.transpose(U) @ U - U @np.transpose(U)))
# print('test VT')
# print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
print(U)
print(s)
print(VT)
D = np.zeros((len(U),len(VT)))
for i in range(0,len(VT)):
D[i,i]=s[i]
@@ -1652,7 +1657,7 @@ We have our design matrix
with $\bm{U}\in {\mathbb{R}}^{n\times n}$, $\bm{\Sigma}\in {\mathbb{R}}^{n\times p}$
and $\bm{V}\in {\mathbb{R}}^{p\times p}$.
We have $\bm{U}^T\bm{U}=\bm{I}$ and $\bm{V}^T\bm{V}=\bm{V}\bm{V}^T=\bm{I}$.
The matrices $\bm{U}$ and $\bm{V}$ are unitary/orthonormal matrices, that is in case the matrices are real we have $\bm{U}^T\bm{U}=\bm{U}\bm{U}^T=\bm{I}$ and $\bm{V}^T\bm{V}=\bm{V}\bm{V}^T=\bm{I}$.
!split
===== Spectral Decomposition of the OLS =====