﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Bluebit Software Support Forum / Technical Support and Help / .NET Matrix Library  / Matrix Size Maximums / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Bluebit Software Support Forum</description><link>http://www.bluebit.gr/forum/</link><webMaster>support@bluebit.gr</webMaster><lastBuildDate>Wed, 08 Feb 2012 18:05:41 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>&lt;FONT size=1&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;Yes, I do.&lt;/P&gt;&lt;P&gt;But I´m afraid that it is not posible for me at this moment to send it in sparse format. I work with BML 2.5. I will pursache later a version with sparse matrices but before, I have to organize all. &lt;/P&gt;&lt;P&gt;If you want, I can send you by ftp or something like that, the dense matrix in a binay format.&lt;/P&gt;&lt;P&gt;Do you want me to send it?&lt;/P&gt;&lt;P&gt;G</description><pubDate>Thu, 20 May 2010 04:29:08 GMT</pubDate><dc:creator>guille</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>guille,&lt;/P&gt;&lt;P&gt;I am working on some sparse SVD routines now, do you want to mail me your matrix (in sparse format) so that I will run some tests with it?</description><pubDate>Mon, 17 May 2010 12:52:00 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Thanks a lot, Trifon&lt;/P&gt;&lt;P&gt;I will check it.</description><pubDate>Mon, 17 May 2010 10:43:19 GMT</pubDate><dc:creator>guille</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Hello guile,&lt;P&gt;See the uploaded document in this post. An algorithm that would converge to the dominant singular vectors would be as follows:&lt;/P&gt;&lt;P&gt;Let A be a m x n matrix. Define u(0) as an m-sized non zero vector and v(0) as an n-sized non zero vector.&lt;/P&gt;&lt;P&gt;Start iterating:&lt;/P&gt;&lt;P&gt;Loop until convergence ( e.g  ( u(t) - u(t-1) )^2 &amp;lt; epsilon )&lt;/P&gt;&lt;P&gt;u(t) = A * v(t-1) /  Sqrt( v(t-1) * v(t-1) )&lt;/P&gt;&lt;P&gt;v(t) = u(t) * A /  Sqrt( u(t-1) * u(t-1) )&lt;/P&gt;&lt;P&gt;Repeat&lt;/P&gt;&lt;P&gt;Then u(t) t-&amp;gt;oo will converge to the dominant left singular vector, v(t) to the dominant right singular vector and  the normalization factor Sqrt( v(t)*v(t) ) will converge to the larger singular value.&lt;/P&gt;&lt;P&gt;After finding u1, s1, v1 then we may subtract their product from matrix A and get A(2). Repeating the process we find u2, s2, v2 and so on.</description><pubDate>Fri, 14 May 2010 02:49:36 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Trifon,&lt;/P&gt;&lt;P&gt;What are these alternatives that you have mentioned?&lt;/P&gt;&lt;P&gt;Are they destinated to generate just a few singular values and vector instead of all the three matrices?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;From a matrix&lt;/P&gt;&lt;P&gt;26.000 X 40.000&lt;/P&gt;&lt;P&gt;And generate: &lt;/P&gt;&lt;P&gt;26.000 X 150 ,   150 X 150  &amp;amp; 40.000 X 150&lt;/P&gt;&lt;P&gt;Instead of all</description><pubDate>Thu, 13 May 2010 10:17:58 GMT</pubDate><dc:creator>guille</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Hello,&lt;/P&gt;&lt;P&gt;Can you send me the matrix data?&lt;/P&gt;&lt;P&gt;Here you can find how to save a matrix in a file : &lt;A href="http://www.bluebit.gr/forum/Topic63-3-1.aspx"&gt;http://www.bluebit.gr/forum/Topic63-3-1.aspx&lt;/A&gt;</description><pubDate>Sun, 09 May 2010 11:58:27 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Thanks for getting back to me over the weekend.  The situation isn't quite as dire as I described.  I've been doing some investigating and the matrix that I'm densing and trying to pass into SVD is, in fact, only 26203x11 cells (2.3 meg), but this too seems to blow the stack on SVD.  With this new info, any thoughts?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Sun, 09 May 2010 09:19:33 GMT</pubDate><dc:creator>jbaronp3</dc:creator></item><item><title>RE: Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>Hello,&lt;/P&gt;&lt;P&gt;Currently NML does not have a direct method for computing the Singular Value Decomposition of a SparseMatrix object. In your code you attempt to convert a SparseMatrix to a dense matrix, but a dense matrix requires more memory and that causes the out of memory error.&lt;/P&gt;&lt;P&gt;A dense matrix of that size would require 26000 X 26000 X 8 = 5,408,000,000 bytes, about 5Gb or RAM. The SVD method uses internally a work area which is 6-8 times larger than the size of the original matrix, this means you would need about 40Gb.  &lt;/P&gt;&lt;P&gt;Even if you had and could use that large amount of memory, it would take ages to compute the singular value decomposition of a matrix because the SVD computation is an O(n^3) process, meaning that when the matrix size is doubled the operation count is multiplied by a factor of 8.&lt;/P&gt;&lt;P&gt;It is possible that there is an alternative way to solve the problem. Do you need to compute all the singular values and vectors or just a few of them? </description><pubDate>Sun, 09 May 2010 03:56:03 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>Matrix Size Maximums</title><link>http://www.bluebit.gr/forum/Topic619-3-1.aspx</link><description>I'm trying to create a 26000x26000 matrix (admittedly very big), which is giving me an out of memory error and I'd like to know if there's anything I can do about this.  I tried creating all of my matricies as SparseMatrix (most of the tables' contents are zeros), but when I try to SVD it (which is all I want to do with the matrix apart from multiplication), it gives me an out-of-memory error message:&lt;/P&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=1 face="Courier New"&gt;&lt;FONT color=#2b91af size=1 face="Courier New"&gt;&lt;FONT color=#2b91af size=1 face="Courier New"&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SparseMatrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; matq = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SparseMatrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;(ncols, ncols);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SparseMatrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; matw = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SparseMatrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;(nrows, nrows);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;SparseMatrix mathc = new SparseMatrix(nrows, ncols); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;//...tables are populated...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;SparseMatrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; mat = matw * mathc * matq;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;Matrix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; bar = mat.ToDense();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SVD&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; svdtable = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;&lt;FONT color=#2b91af face="Courier New"&gt;SVD&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;FONT size=1 face="Courier New"&gt;&lt;FONT size=2&gt;(bar);&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;Are there plans to make a sparsematrix SVD function?  Thanks!</description><pubDate>Sat, 08 May 2010 11:05:59 GMT</pubDate><dc:creator>jbaronp3</dc:creator></item></channel></rss>
