LDA: Linear Discriminant Analysis

Description Usage Arguments Details Value Functions

Description

Fit a classifier using a generalization of Fischer's linear discriminant.

Usage

1
2
3

Arguments

formula

An R formual specifying the LDA

data

An R data frame

X

a matrix

a

a vector of suitable dimension

Details

The result is found using a relatively simple formula where the components of a discriminant hyper plane are found separately. This makes it easier to generate predictions later.

f(x) = 1 \mathrm{ if } a \cdot x + b > 0

a = Σ^{-1} μ_1 - μ_0

b = -\frac{1}{2} μ_1 ' Σ^{-1} μ_1 + \frac{1}{2} μ_0 ' Σ^{-1} μ_0 + \log \frac{p_1}{p_0}

Value

A list with the following items

actual

the original target values

x

the original model data matrix

fit

the class values

preds

the values of the linear combination

a

the LDA coefficients

b

the LDA threshold, or intercept

A numeric scalar

Functions


michaelquinn32/adventureR documentation built on May 22, 2019, 9:52 p.m.