factor_analyzer.factor_analyzer_utils.covariance_to_correlation

factor_analyzer.factor_analyzer_utils.covariance_to_correlation(m)

Compute cross-correlations from the given covariance matrix.

This is a port of R cov2cor() function.

Parameters

Name Type Description Default
m array - like The covariance matrix. required

Returns

Name Type Description
retval numpy.ndarray The cross-correlation matrix.

Raises

Name Type Description
ValueError If the input matrix is not square.