Projection On 2D {EMCluster} | R Documentation |
Produce Projection on 2D
Description
The function projects multivariate data on 2D plane which can be displayed
by plotppcontour()
later.
Usage
project.on.2d(x, emobj = NULL, pi = NULL, Mu = NULL,
LTSigma = NULL, class = NULL, method = c("PP", "SVD"))
Arguments
x |
the data matrix, dimension |
emobj |
the desired model which is a list mainly contains |
pi |
the mixing proportion, length |
Mu |
the centers of clusters, dimension |
LTSigma |
the lower triangular matrices of dispersion,
|
class |
id of classifications, length |
method |
either projection pursuit or singular value decomposition. |
Details
This function produces projection outputs of x
and emobj
.
Value
A projection is returned which is a list contains
-
da
is an \times 2
projected matrix ofx
. -
Pi
is the original proportionemobj$pi
of lengthK
. -
Mu
is aK \times 2
projected matrix ofemboj$Mu
. -
S
is a2 \times 2 \times K
projected array ofemboj$LTSigma
. -
class
is the original class idemobj$class
. -
proj.mat
is the projection matrix of dimensionp \times 2
.
Author(s)
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
References
https://www.stat.iastate.edu/people/ranjan-maitra
See Also
Examples
## Not run:
library(EMCluster, quietly = TRUE)
set.seed(1234)
### Iris.
x <- as.matrix(iris[, 1:4])
ret <- init.EM(x, nclass = 3, min.n = 30)
ret.proj <- project.on.2d(x, ret)
### Plot.
pdf("iris_ppcontour.pdf", height = 5, width = 5)
plotppcontour(ret.proj$da, ret.proj$Pi, ret.proj$Mu, ret.proj$S,
ret.proj$class, main = "Iris K = 3")
dev.off()
## End(Not run)