*** Linear Discriminant Analysis ***

Here is a three-dimensional illustration of a linear discriminant analysis of Iris data sets:

This figure was created using python sklearn function with n_components=3:

class sklearn.lda.LDA(solver=‘svd’, shrinkage=None, priors=None, n_components=3, store_covariance=False, tol=0.0001)

n_components: Number of components (less than n_classes - 1) for dimensionality reduction.

Similar figure can be plotted using R functions. Note that the default n_components = n_classes -1 in LDA functions.