Description Usage Arguments Details Value Functions
Fit a classifier using a generalization of Fischer's linear discriminant.
1 2 3 |
formula |
An R formual specifying the LDA |
data |
An R data frame |
X |
a matrix |
a |
a vector of suitable dimension |
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}
A list with the following items
the original target values
the original model data matrix
the class values
the values of the linear combination
the LDA coefficients
the LDA threshold, or intercept
A numeric scalar
quadform
: Quickly process quadratic forms (support for LDA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.