lda() — Linear Discriminant Analysis

Separates classes with a straight line from their means.

lda(X, y)

Key idea

Definition

the two class means
the shared covariance of both classes
the threshold (midpoint)
the discriminant score

In plain words

Find the centre of each group, then draw the straight line that best keeps them apart.

Where you'd use it

Frequently asked questions

What does LDA assume?
Each class is normal with the same covariance; if spreads differ, consider QDA.