Created
August 5, 2017 06:01
-
-
Save infinite-Joy/1f32307c3d9910b7b28fd429b1779b32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mean_vec = np.mean(X_std, axis=0) | |
cov_mat = (X_std - mean_vec).T.dot((X_std - 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