Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2017 06:01
What would you like to do?
mean_vec = np.mean(X_std, axis=0)
cov_mat = (X_std - mean_vec) - mean_vec)) / (X_std.shape[0]-1)
print('Covariance matrix \n{}'.format(cov_mat))
print('Covariance matrix shape is: {}'.format(cov_mat.shape))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment