View source: R/libMatTransFull.R
MatTrans.init | R Documentation |
Runs the initialization for the EM algorithm for matrix clustering
MatTrans.init(Y, K, n.start = 10, scale = 1)
Y |
dataset of random matrices (p x T x n), n random matrices of dimensionality (p x T) |
K |
number of clusters |
n.start |
initial random starts |
scale |
scaling parameter |
Random starts are used to obtain different starting values. The number of clusters, the skewness parameters, and number of random starts need to be specified. In the case when transformation parameters are not provided, the function runs the EM algorithm without any transformations, i.e., it is equivalent to the EM algorithm for a matrix Gaussian mixture. Notation: n - sample size, p x T - dimensionality of the random matrices, K - number of mixture components.
set.seed(123)
data(crime)
Y <- crime$Y[c(2,7),,] / 1000
p <- dim(Y)[1]
T <- dim(Y)[2]
n <- dim(Y)[3]
K <- 2
init <- MatTrans.init(Y, K = K, n.start = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.