Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.lda import LDA
- #linear discriminant analysis method, returning the data after dimensionality reduction
- #Parameter n_components is the dimensionality after dimension reduction
- LDA(n_components=2).fit_transform(iris.data, iris.target)
Add Comment
Please, Sign In to add comment