Hi to all,
I am having a problem with the solvers provided in MathNet. Let me explain what I am trying to do, I have a very big non-square sparse matrix (five non-zeroes per row), of a size of 20,000x12,000, and I would like to solve it with the least squares method, but I am stucked.
I could prepare the matrix to solve it with a direct solver like LUby setting some fixed values and getting a square matrix and some other things (it is the way I was trying to implement). But, how can I solve this system by least squares method? Can I do it without any pre-processing directly over the Mx = b system?
I have this variables:
I have tried to define the matrixv M as a DenseMatrix, but I get an OutOfMemory exception, but defining a smaller DenseMatrix I get the same message...
What is happening? I do not know to use the solvers, any help? On the other hand, would you do this
I am having a problem with the solvers provided in MathNet. Let me explain what I am trying to do, I have a very big non-square sparse matrix (five non-zeroes per row), of a size of 20,000x12,000, and I would like to solve it with the least squares method, but I am stucked.
I could prepare the matrix to solve it with a direct solver like LUby setting some fixed values and getting a square matrix and some other things (it is the way I was trying to implement). But, how can I solve this system by least squares method? Can I do it without any pre-processing directly over the Mx = b system?
I have this variables:
MathNet.Numerics.LinearAlgebra.Double.SparseMatrix M = new MathNet.Numerics.LinearAlgebra.Double.SparseMatrix(m,n, 0.0);But when I try to solve it (directly, without preparing it, just to see what happens):
//I populate the matrix with the .SetRow method
MathNet.Numerics.LinearAlgebra.Double.DenseVector b = new MathNet.Numerics.LinearAlgebra.Double.DenseVector(m);
MathNet.Numerics.LinearAlgebra.Double.DenseVector result = M.LU().Solve(b);It appears a message saying that SparseMatrix does not contain a definition called LU or an extension method called like that...
I have tried to define the matrixv M as a DenseMatrix, but I get an OutOfMemory exception, but defining a smaller DenseMatrix I get the same message...
What is happening? I do not know to use the solvers, any help? On the other hand, would you do this