batcoord {fpc} | R Documentation |
Bhattacharyya discriminant projection
Description
Computes Bhattacharyya discriminant projection coordinates as described in Fukunaga (1990), p. 455 ff.
Usage
batcoord(xd, clvecd, clnum=1, dom="mean")
batvarcoord(xd, clvecd, clnum=1)
Arguments
xd |
the data matrix; a numerical object which can be coerced to a matrix. |
clvecd |
integer or logical vector of class numbers; length must equal
|
clnum |
integer, one of the values of |
dom |
string. |
Details
batvarcoord
computes the optimal projection coordinates with
respect to the difference in variances. batcoord
combines the
differences in mean and variance as explained for the argument dom
.
Value
batcoord
returns a list with the components ev, rev,
units, proj
. batvarcoord
returns a list with the components
ev, rev, units, proj, W, S1, S2
.
ev |
vector of eigenvalues. If |
rev |
for |
units |
columns are coordinates of projection basis vectors.
New points |
proj |
projections of |
W |
matrix |
S1 |
covariance matrix of the first class. |
S2 |
covariance matrix of the second class. |
Author(s)
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/
References
Fukunaga, K. (1990). Introduction to Statistical Pattern Recognition (2nd ed.). Boston: Academic Press.
See Also
plotcluster
for straight forward discriminant plots.
discrcoord
for discriminant coordinates.
rFace
for generation of the example data used below.
Examples
set.seed(4634)
face <- rFace(600,dMoNo=2,dNoEy=0)
grface <- as.integer(attr(face,"grouping"))
bcf2 <- batcoord(face,grface==2)
plot(bcf2$proj,col=1+(grface==2))
bcfv2 <- batcoord(face,grface==2,dom="variance")
plot(bcfv2$proj,col=1+(grface==2))
bcfvv2 <- batvarcoord(face,grface==2)
plot(bcfvv2$proj,col=1+(grface==2))