IAE Academy

LDA, SVM & trees formulas

Linear discriminant analysis, support vector machines and decision trees. 18 formulas for GATE DA Machine Learning, each with when to use it. Each is explained in the topic notes.

All 18 LDA, SVM & trees formulas

DISTANCE OF A POINT FROM A HYPERPLANE

Euclidean distance from to the hyperplane , for .

LDA PARAMETER ESTIMATES (POOLED COVARIANCE)

Class means, priors and the pooled within-class covariance, where is the number of samples in class . Dividing by instead of only rescales . With equal priors the decisions are unchanged. With unequal priors the term gets a slightly different relative weight, so borderline decisions can change.

LINEAR DISCRIMINANT FUNCTION

Assign to the class with the largest ; is the natural logarithm. This assumes Gaussian classes with a common .

TWO-CLASS LDA RULE

This is . The boundary is a hyperplane with normal vector . It passes through the midpoint of the means when . Unequal priors shift it away from the more probable class.

FISHER CRITERION (TWO CLASSES)

Here are the projected means and the projected scatters. Maximise over . depends only on the direction of , not on its length.

FISHER'S OPTIMAL DIRECTION

The same direction as the two-class LDA weight vector, because is proportional to the pooled covariance. must be invertible.

MARGIN WIDTH

The distance between the hyperplanes . Valid only under the canonical scaling (closest points at ). The bias does not affect it.

HARD-MARGIN SVM (PRIMAL)

Requires linearly separable data. Maximising is the same as minimising .

HARD-MARGIN SVM (DUAL)

Only points with contribute to ; these are the support vectors. By complementary slackness, , so every support vector lies exactly on .

SOFT-MARGIN SVM (PRIMAL)

In the dual, the only change from the hard margin is the box constraint .

SOFT-MARGIN SVM AS HINGE LOSS

At the optimum , which turns the constrained problem into this unconstrained one.

COMMON KERNELS

Polynomial kernel: degree a positive integer and . RBF (Gaussian) kernel: , often written . RBF values lie in and equal 1 only when .

KERNELISED DECISION FUNCTION

Only the support vectors () contribute to the sum.

ENTROPY (IN BITS)

is the fraction of class in node . Entropy ranges from (a pure node) to (all classes equally likely), which is bit for two balanced classes.

GINI INDEX

Ranges from (pure) to (equal classes), which is for two balanced classes. For two classes with proportions : .

MISCLASSIFICATION ERROR

Ranges from to . For two classes, . Entropy and Gini respond more strongly to changes in node purity, so they are the usual criteria for growing a tree.

INFORMATION GAIN OF A SPLIT

is the subset sent to child by the test . The same weighted-average pattern with in place of gives the Gini reduction. Choose the split with the largest gain.

GAIN RATIO

Divides the gain by the entropy (in bits) of the split proportions themselves. This penalises tests that break the node into many small branches.

Where this was asked: 2024 (4), 2025 (2), 2026 (1). See the 7 previous-year questions on LDA, SVM & trees. This shows what was asked, not what will be asked.