Re: nnz in convariance of a sparse matrix



H. S. <g_reate_xcalibur@xxxxxxxxx> wrote:

> If a sparse matrix A has n nnz (number of non-zero elements), how many
> nnz does A'A have, where A' is the transpose of A?

> I am tring to allocate space (in a C++ program) for the covariance of A,
> where A is sparse. A is real, square and it's each column has exactly r
> non-zero elements. So, if A is NxN, it has rxN non-zero elements, where
> r is a positive integer: r << N.

> Is there a relationship which gives the max nnz in A'A? Or if you can
> give me references or URLs where I can read about this, it would be
> great too.

> thanks,
> ->HS
> --
> (Remove all underscores,if any, from my email address to get the correct
> one. Apologies for the inconvenience but this is to reduce spam.)

What is the use of the covariance matrix? If, for example, you want
to find the eigenvectors of the covariance matrix, you do not need to
form A' A explicitly.

.



Relevant Pages

  • nnz in convariance of a sparse matrix
    ... If a sparse matrix A has n nnz (number of non-zero elements), how many nnz does A'A have, where A' is the transpose of A? ...
    (sci.math.num-analysis)
  • Re: Counting non-zero elements in sparse matrix
    ... I have a large NxM sparse matrix. ... number of non-zero elements in sub-matrices of this matrix. ... The sub-matrices are index by row and column indices of the original ... An alternative is to store your sparse matrix in a hierarchical format like ...
    (comp.programming)
  • Re: Counting non-zero elements in sparse matrix
    ... I have a large NxM sparse matrix. ... number of non-zero elements in sub-matrices of this matrix. ... An alternative is to store your sparse matrix in a hierarchical format like ...
    (comp.programming)
  • Re: add/remove elements in mex sparse format
    ... I add and remove elements in the sparse matrix by using indices as for example if ir has 6 non-zero elements and 3 is removed I write ... I got a bit curious here, how does MATLAB handle the above if A is sparse? ... Welcome to sparse mex programming. ...
    (comp.soft-sys.matlab)
  • Re: Sparse Matrix Calculation exceed full matrix times
    ... Well, I obviously do not fill all the zeros, just some, ... Do not just set elements in a sparse matrix ...
    (comp.soft-sys.matlab)