Lda, Machine Learning, Dimensionality Reduction, Linear Discriminant.
sklearn.datasets import load_iris from sklearn.discriminant_analysis import LinearDiscriminantAnalysis # Load the Iris dataset iris = load_iris() X = iris.data y = iris.target # Initialize LDA and fit the model lda = LinearDiscriminantAnalysis(n_components=2) X_lda = lda.fit_transform(X, y) # Plot