bundles / scipy latest / scipy / stats / _multivariate / random_correlation_gen / _givens_to_1
function
scipy.stats._multivariate:random_correlation_gen._givens_to_1
Signature
def _givens_to_1 ( self , aii , ajj , aij ) Summary
Computes a 2x2 Givens matrix to put 1's on the diagonal.
Extended Summary
The input matrix is a 2x2 symmetric matrix M = [ aii aij ; aij ajj ].
The output matrix g is a 2x2 anti-symmetric matrix of the form [ c s ; -s c ]; the elements c and s are returned.
Applying the output matrix to the input matrix (as b=g.T M g) results in a matrix with bii=1, provided tr(M) - det(M) >= 1 and floating point issues do not occur. Otherwise, some other valid rotation is returned. When tr(M)==2, also bjj=1.
Aliases
-
scipy.stats._multivariate.random_correlation_gen._givens_to_1