CANDISC#
Overview#
Canonical discriminant analysis is a dimension-reduction technique related to principal component analysis and canonical correlation. The methodology that is used in deriving the canonical coefficients parallels that of a one-way multivariate analysis of variance (MANOVA). MANOVA tests for equality of the mean vector across class levels. Canonical discriminant analysis finds linear combinations of the quantitative variables that provide maximal separation between classes or groups.
CANDISC is a somewhat hybrid learning nature with two setps:
Semi-supervised: On one hand, CANDISC has an unsupervised or descriptive aspect that aims to tackle the following question. How to find a representation of the objects which provides the best separation between classes?
Supervised: On the other hand, CANDISC also has a decisively supervised aspect that tackles the question: How to find the rules for assigning a class to a given object?
Semi-supervised Aspect#
Mathematical formula of the CANDISC classifier#
In Semi-supervised aspect, the gold is to find a low dimensional representation of the objects which provides the best separation between classes. We can look for an axis \(\Delta_{a}\), spanned by some columns vector \(a=(a_{1},a_{2},\dots,a_{p})\), such that the linear combinations [1]:
that separates all \(K\) groups in an adequate way.
Algebraically, the idea is to look for a linear combination of the predictors :
that ideally could achieve the following two goals [2]:
Minimize (pooled) within-class dispersion (wss): \(\underbrace{\min}_{a}\left\{a^{T}W_{b}a\right\}\)
Maximize between-class dispersion (bss): \(\underbrace{\max}_{a}\left\{a^{T}B_{b}a\right\}\)
On one hand, it would be nice to have \(a\), such that the between-class dispersion is maximized. This corresponds to a situation in which the class centroids are well separated. On the other hand, it would also make sense to have \(a\), such that the within-class dispersion is minimized. This implies having classes in which, on average, the “inner” variation is small (i.e. concentrated local dispersion).
Can we find such a mythical vector \(a\)?
Looking for a Compromise Criterion#
So far we have an impossible simultaneity involving a minimization criterion, as well as a maximization criterion:
What can we do to look for a compromise. Using the Huygens theoreom, the variance can be deomposed as:
Doing some algebra, it can be shown that the quadratic form \(a^{T}V_{b}a\) can be decomposed as:
Again, we are pursuing a dual goal that is, in general, hard to accomplish:
We have two options for the compromise:
which are actually associated to the following ratios:
where \(\eta^{2}\) is the correlation ratio and \(F\) the \(F\)-ratio.
Correlation Ratio#
If we decide to work with the first criterion, we look for \(a\) such that:
This criterion is scale invariant, meaning that we use any scale variation of \(a\): i.e. \(\alpha a\). For convenience, we can impose a normalizing restriction: \(a^{T}V_{b}a=1\). Consequently.
Using the method of Lagrangien multiplier:
Deriving w.r.t \(a\) and equating to zero:
The optimal vector \(a\) is such that:
If the matrix \(V_{b}\) is inversible, which it is in general, then :
that is, the optimal vector \(a\) is eigenvector of \(V_{b}^{-1}B_{b}\). Keep in mind that, in general, \(V_{b}^{-1}B_{b}\) is not symmetric.
\(F\)-ratio Criterion#
Now, if we decide to work with the criterion associated to the F ratio, then the criterion to be maximized is:
Applying the same Lagrangien procedure, with a multiplier \(\rho\), we have that \(a\) is such a vector that:
and if \(W_{b}\) is inversible, which it is in most cases, then it can be shown that \(a\) is also eigenvector of \(W_{b}^{-1}B_{b}\), associated to eigenvalue \(\rho\):
Relationshop between eigenvalues#
The relationship between the eigenvalues \(\lambda\) and \(\rho\) is :
Note
\(\lambda = \eta^{2}\) correspond to the correlation ratio and is range between \(0\) and \(1\) (\(0 \leq \lambda \leq 1\)).
\(\sqrt{\lambda} = \eta\) correspond to the canonical correlation.
\(\lambda\) are not additive from one factor to another.
Eiganvalues \(\rho\) are added together from one factor to another.
Raw Canonical coefficients#
Coefficients \(a_{h} (h=1,\dots,H)\) are obtained using the following formula:
where \(b_{h}\) is the eigenvector of \(C^{T}V_{b}^{-1}C\) and \(C\), a matrix of shape \((p,K)\) such as \(V_{b}=CC^{T}\) and
The intercept, \(a_{h0}\), correspond to:
Supervised Aspect#
The supervised learning aspect of CANDISC has to do with the question: how do we use it for classification purposes? This involves establishing a decision rule that let us predict the class of an object. CANDISC proposes a geometric rule of classification.
Distance behind CANDISC#
The squared Euclidean distance between two vectors \(x_{i}\) and \(x_{i^{'}}\) is defined as:
The squared Euclidean distance between the vector \(x_{i}\) and the coordinates of the centroids \(g_{k}\) is defined as:
The generalized squared distance between the vector \(x_{i}\) and the coordinates of the centroids \(g_{k}\) is defined as:
where \(\widehat{\pi}_{k}\) is the prior probability of class \(\mathcal{C}_{k}\).
Predictive idea#
The classification rule used in CANDISC consists of assigning each individual \(x_{i}\) to the class \(\mathcal{C}_{k}\) for which the distance to the centroid is minimal. For that, we use a variant of softmax transformation for estimated probabilities:
Classification Functions Coefficients#
From the generalized square distance, it is possible to deduct the classification function coefficients.
Since the canonical discriminant function is a linear function of original variables :
we can deduct the linear expression of the classification function for the CANDISC:
where \(\beta_{k0} = \log \left(\widehat{\pi}_{k}\right) + \displaystyle \sum_{h}^{h=H}a_{h0}\overline{z}_{kh} -\dfrac{1}{2}\displaystyle \sum_{h=1}^{h=H}\overline{z}_{kh}^{2}\) and \(\beta_{kj} = \displaystyle \sum_{h=1}^{h=H}a_{hj}\overline{z}_{kh}\).
For more details about canonical discriminant analysis, see SAS CANDISC Procedure.
Footnotes
References