Matrix Compression Task

From GM-RKB
Jump to navigation Jump to search

A Matrix Compression Task is a compression task that accepts a matrix and produces a compressed matrix.

     A = np.random.randn(9, 6) + 1.j*np.random.randn(9, 6)
     A = numpy.array([
               [2.0, 0.0, 8.0, 6.0, 0.0], 
               [1.0, 6.0, 0.0, 1.0, 7.0], 
               [5.0, 0.0, 7.0, 4.0, 0.0], 
               [7.0, 0.0, 8.0, 5.0, 0.0],
               [0.0, 10.0, 0.0, 0.0, 7.0]])
     U,sigma,Vh = numpy.linalg.svd(A, full_matrices=True)
     U.shape, Vh.shape, sigma.shape
     for i in xrange(1, 51, 5):
         dA = np.matrix(U[:, :i]) * np.diag(sigma[:i]) * np.matrix(Vh[:i, :])


References

2010

  • (Börm, 2010) ⇒ Steffen Börm. (2010). “Efficient numerical methods for non-local operators: H2-matrix compression, algorithms and analysis." European Mathematical Society.