1from matplotlib import pyplot as plt
2from sklearn.decomposition import PCA
3import seaborn as sns
4import pandas as pd
5
6pca = PCA.fit(X_train)
7
8df_var_explained = pd.DataFrame(pca.explained_variance_ratio_)
9
10plt.figure(figsize=(20, 20))