Jump to content

Singular value decomposition: Difference between revisions

m
Line 257:
│ 0.265687 _0.830077 0.466712│ │0.554592 _0.230425 0.799582│
│ 0.499894 _0.0635067 _0.12233│ │0.665583 _0.453876 _0.592449│
│ 0.819701 0.353195 0.0165088│ │ │
└──────────────────────────────┴────────────────────────┴─────────────────────────────┘</syntaxhighlight>
 
Note that Σ is just the diagonal here. If we wish it in matrix form we can multiply that diagonal by the corresponding identity matrix. For example:
 
<syntaxhighlight lang=J> ({.,(* =@i.@#)&.>@(1&{),{:) svd 2 3 5,7 11 13,17 19 23,:29 31 37
┌──────────────────────────────┬────────────────────────┬─────────────────────────────┐
│0.0872159 _0.426839 _0.875752│68.6864 0 0│0.499426 0.860756 _0.0983486│
│ 0.265687 _0.830077 0.466712│ 0 2.90306 0│0.554592 _0.230425 0.799582│
│ 0.499894 _0.0635067 _0.12233│ 0 0 0.868048│0.665583 _0.453876 _0.592449│
│ 0.819701 0.353195 0.0165088│ │ │
└──────────────────────────────┴────────────────────────┴─────────────────────────────┘</syntaxhighlight>
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.