def _compute_subcorr(G, phi_sig):
 (Ug, Sg, Vg) = linalg.svd(G, full_matrices=False)
 tmp = np.dot(Ug.T.conjugate(), phi_sig)
 (Uc, Sc, Vc) = linalg.svd(tmp, full_matrices=False)
 X = np.dot(np.dot(Vg.T, np.diag((1.0 / Sg))), Uc)
 return (Sc[0], (X[:, 0] / linalg.norm(X[:, 0])))

def _compute_subcorr ( G , phi_sig ) : ( Ug , Sg , Vg ) = linalg . svd ( G , full_matrices = False ) tmp = np . dot ( Ug . T . conjugate ( ) , phi_sig ) ( Uc , Sc , Vc ) = linalg . svd ( tmp , full_matrices = False ) X = np . dot ( np . dot ( Vg . T , np . diag ( ( 1.0 / Sg ) ) ) , Uc ) return ( Sc [ 0 ] , ( X [ : , 0 ] / linalg . norm ( X [ : , 0 ] ) ) )
compute the subspace correlation .