I need to calculate the Singular Value Decomposition of a Dense matrix but it doesn't seem to be included in the package I'm using: MathNet.Numerics x86 v2.4.0.26
downloaded from Nuget package manager.
I am referencing this question Svd recomposition..
The syntax included in the answer linked is:
var m = DenseMatrix.OfArray(new double[,] {
{ 3, 0, 0, 0, 0 },
{ 0, 2, 4, 0, 0 },
{ 0, 4, 5, -4, 5 },
{ 0, 0, -4, -8, 12},
{ 0, 0, 5, 12, -5 }});
var svd = m.Svd(true); //The method Svd() doesn't seem to be available in v2.4
svd.U() * svd.W() * svd.VT()
Nor is svd()
listed in the documentation.
I'm looking for a simple example of generating a SVD of a DenseMatrix using the MathNet.Numerics x86 library.
Unfortunately the method inverse()
is just returning NaN so I'm hoping to approximate the inverse using singular value decomposition.