def empirical ( X ) : print ( "Empirical" ) cov = np . dot ( X . T , X ) / n_samples return cov , np . linalg . inv ( cov )
how to calculate covariance python
Compute empirical covariance as baseline estimator .
def empirical(X):
    """Compute empirical covariance as baseline estimator.
    """
    print("Empirical")
    cov = np.dot(X.T, X) / n_samples
    return cov, np.linalg.inv(cov)