Dimensionality Reduction, Pca, Machine Learning, Lda, Curse Of Dimensionality.
cumsum = np.cumsum(pca.explained_variance_ratio_) no_of_principal_components = np.argmax(cumsum >= 0.95) + 1 print(f"Number of principal components: {no_of_principal_components}\n\nCummulative sum of variance ratio: {cumsum}.") sns.set_style('darkgrid') plt.plot(list(range(1, 12)), cumsum,