📜  scree plot sklearn - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:51.380000             🧑  作者: Mango

代码示例1
from matplotlib import pyplot as plt
from sklearn.decomposition import PCA
import seaborn as sns
import pandas as pd

pca = PCA.fit(X_train)
            
df_var_explained = pd.DataFrame(pca.explained_variance_ratio_)

plt.figure(figsize=(20, 20))