Timeout when creating a large Matrix

Jun 21, 2011 at 11:29 AM

Hi there,

 

sorry for bothering again :/

I create my matrix as follows:

SparseMatrix TDM = new SparseMatrix(43779, 793);

Immediately after creating, I can't access any properties of any variables / matrices.

I just get an "The timeout for the evaluation function has been exceeded" message in the locals view.

In my final program the matrices I'll be working on will probably be much larger.

Any ideas how to solve this problem?

 

Thanks in advance,

ScheffK0ch

 

Jun 21, 2011 at 12:41 PM

Hi,

I couldn't replicate the problem. Which version of the library are you using? Are you using the Microsoft runtime or Mono?

Thanks,

Marcus

Jun 21, 2011 at 12:49 PM

Hi, 

I'm using Visual Studio 2010 C# Express with the latest MathNet Numerics version from 17 April 2011.

Hope thats all the information you need.

 

Kindest regards,

ScheffK0ch

Jun 21, 2011 at 12:52 PM

hmm, I don't know what the problem can be. Does something this simple work?

    class Program
    {
        static void Main(string[] args)
        {

            var sparse = new MathNet.Numerics.LinearAlgebra.Double.SparseMatrix(43779, 793);
            Console.WriteLine(sparse.ColumnCount);
            Console.WriteLine(sparse.RowCount);
        }
    }
Thanks,
Marcus

Jun 21, 2011 at 12:55 PM

Yes, that works,

 

but try checking the "IsSymmetric" Property in the debugger.

This is where I get an error.

Jun 21, 2011 at 1:01 PM

For example try:

class Program
    {
        static void Main(string[] args)
        {

            var sparse = new MathNet.Numerics.LinearAlgebra.Double.SparseMatrix(43779,793);
            Console.WriteLine(sparse.ColumnCount);
            Console.WriteLine(sparse.RowCount);
           
            var svd = sparse.Svd(true);

            Console.ReadLine();
        }
    }

 

After the SVD I can't access any variables in the debugger and the program seems to be frozen.

 

Jun 21, 2011 at 1:10 PM

IsSymmetric and SVD both worked, but SVD did take some time. Our SVD implementation isn't optimized for sparse matrices. It uses the inefficient UserSvd class - treats the matrix like a dense matrix and uses At() to access the elements.

Jun 21, 2011 at 1:23 PM
Edited Jun 21, 2011 at 1:28 PM

This is what I get in the debugger:

 

http://img219.imageshack.us/img219/5819/errormatrix.jpg

 

Any other idea how I can create a large matrix and do an SVD with it?

 

Thanks again for your time,

ScheffK0ch

Jun 21, 2011 at 1:28 PM

Does it work outside of the debugger?

Jun 21, 2011 at 1:47 PM

Seems like it's just a problem with the debugger.

I can't access the variables & properties in the locals view, but i get no error when accessing the properties in my code.

http://imageshack.us/photo/my-images/8/errormatrix2.jpg/

Hopefully my SVD with real values doesn't crash but just takes veeeeeeery long!

Jun 22, 2011 at 1:26 PM

Any chance of an implementation of a sparse matrix optimized SVD in the near future?

Because in the end my sparse matrix will have a size around 1500x80000.

And I'm not sure if the UserSVD will complete the calculation in an acceptable time :/

Jun 22, 2011 at 2:55 PM

>Any chance of an implementation of a sparse matrix optimized SVD in the near future?

Sorry, not in the near future.