Let's use the equation to work through a loan approval example. To recap, the bank is deciding whether to approve or reject loan applications. The bank uses two features to make this decision: the applicant's credit score (x) and annual income. The bank has collected historical data on previous loan applicants and whether the loans were approved.
- Class ω0 represents "Loan rejected."
- Class ω1 represents "Loan approved."
Using the linear discriminant function, the bank can calculate a score (δ(x)) for each loan application.
The equation for the linear discriminant function might look similar to this:
δ(x) = x * ( σ2 * (μ0-μ1) - 2 * σ2 * (μ02-μ12) + ln(P(w0) / P(w1)))
- x represents the applicant's credit score and annual income.
- μ0 and μ1 are the means of these features for the two classes: "Loan rejected" and "Loan approved."
- σ2 is the common within-class variance.
- P(ω0) is the prior probability of "Loan rejected", and P(ω1) is the prior probability of "Loan approved".
The bank computes the linear discriminant function for each loan application.
- If δ(x) is positive, it suggests that the loan application is more likely to be approved.
- If δ(x) is negative, it suggests that the loan application is more likely to be rejected.
The bank can thus automate its loan approval process, making quicker and more consistent decisions while minimizing human bias.