Fit the Tensor Gaussian Mixture Model (TGMM)
TGMM(Xn, K, shape = "shared", initial = "kmeans",
iter.max = 500, stop = 1e-3, trueY = NULL, print = FALSE)
The tensor for clustering, should be array type, the last dimension is the sample size n
.
Number of clusters, greater than or equal to 2
.
"shared" if assume common covariance across mixtures, "distinct" if allow different covariance structures. Default value is "shared".
Initialization meth0d for the regularized EM algorithm. Default value is "kmeans".
Maximum number of iterations. Default value is 500
.
Convergence threshold of relative change in cluster means. Default value is 1e-3
.
A vector of true cluster labels of each observation. Default value is NULL.
Whether to print information including current iteration number, relative change in cluster means
and clustering error (%
) in each iteration.
A vector of estimated labels.
A vector of estimated prior probabilities for clusters.
A n
by K
matrix of estimated membership weights.
A list of estimated cluster means.
A list of estimated covariance matrices.
The TGMM
function fits the Tensor Gaussian Mixture Model (TGMM) through the classical EM algorithm. TGMM assumes the following tensor normal mixture distribution of M-way tensor data \(\mathbf{X}\):
$$
\mathbf{X}\sim\sum_{k=1}^K\pi_k \mathrm{TN}(\bm{\mu}_k,\mathcal{M}_k),\quad i=1,\dots,n,
$$
where \(0<\pi_k<1\) is the prior probability for \(\mathbf{X}\) to be in the \(k\)-th cluster such that \(\sum_{k=1}^{K}\pi_k=1\), \(\bm{\mu}_k\) is the mean of the \(k\)-th cluster, \(\mathcal{M}_k \equiv \{\bm{\Sigma}_{km}, m=1,\dots,M\}\) is the set of covariances of the \(k\)-th cluster. If \(\mathcal{M}_k\)'s are the same for \(k=1,\dots,K\), call TGMM
with argument shape="shared"
.
Deng, K. and Zhang, X. (2021). Tensor Envelope Mixture Model for Simultaneous Clustering and Multiway Dimension Reduction. Biometrics.
Tait, P. A. and McNicholas, P. D. (2019). Clustering higher order data: Finite mixtures of multidimensional arrays. arXiv:1907.08566.
# NOT RUN {
A = array(c(rep(1,20),rep(2,20))+rnorm(40),dim=c(2,2,10))
myfit = TGMM(A,K=2,shape="shared")
# }
Run the code above in your browser using DataLab