Skip to content

Instantly share code, notes, and snippets.

@peeush-agarwal
Created March 14, 2022 17:25
Show Gist options
  • Save peeush-agarwal/f88cc066bcd894a1a535d24934c07710 to your computer and use it in GitHub Desktop.
Save peeush-agarwal/f88cc066bcd894a1a535d24934c07710 to your computer and use it in GitHub Desktop.
PCA: computation of eigen values for the dataframe
import numpy as np
cov_mat = np.cov(X_train_std.T)
eigen_vals, eigen_vecs = np.linalg.eig(cov_mat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment