tune_lamb: Parameter tuning in enhanced E-step in DEEM

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/tune_lamb.R

Description

Perform parameter tuning through BIC in DEEM.

Usage

1
tune_lamb(X, K, seqlamb, initial = TRUE, vec_x = NULL)

Arguments

X

Input tensor (or matrix) list of length n, where n is the number of observations. Each element of the list is a tensor or matrix. The order of tensor can be any positive integer not less than 2.

K

Number of clusters.

seqlamb

A sequence of user-specified lambda values. lambda is the weight of L1 penalty and a smaller lambda allows more variables to be nonzero

initial

Whether to initialize algorithm with K-means clustering. Default value is TRUE.

vec_x

Vectorized tensor data. Default value is NULL

Details

The tune_lamb function adopts a BIC-type criterion to select the tuning parameter λ in the enhanced E-step. Let \widehat{\bm{θ}}^{λ} be the output of DEEM with the tuning parameter fixed at λ, tune_lamb looks for the value of λ that minimizes

\mathrm{BIC}(λ)=-2∑_{i=1}^n\log(∑_{k=1}^K\widehat{π}^{λ}_kf_k(\mathbf{X}_i;\widehat{\bm{θ}}_k^{λ}))+\log(n)\cdot |\widehat{\mathcal{D}}^{λ}|,

where \widehat{\mathcal{D}}^{λ}=\{(k, {\mathcal{J}}): \widehat b_{k,{\mathcal{J}}}^{λ} \neq 0 \} is the set of nonzero elements in \widehat{\bm{B}}_2^{λ},…,\widehat{\bm{B}}_K^{λ}. The tune_lamb function intrinsically selects the initial point and return the optimal estimated labels.

Value

opt_lamb

Tuned lambda that leads to optimal BIC.

opt_bic

BIC value.

opt_y

Estimated labels fitted by DEEM with tuned lambda.

Author(s)

Kai Deng, Yuqing Pan, Xin Zhang and Qing Mai

References

Mai, Q., Zhang, X., Pan, Y. and Deng, K. (2021). A Doubly-Enhanced EM Algorithm for Model-Based Tensor Clustering. Journal of the American Statistical Association.

See Also

DEEM, tune_K

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dimen = c(5,5,5)
nvars = prod(dimen)
K = 2
n = 100
sigma = array(list(),3)

sigma[[1]] = sigma[[2]] = sigma[[3]] = diag(5)

B2=array(0,dim=dimen)
B2[1:3,1,1]=2

y = c(rep(1,50),rep(2,50))
M = array(list(),K)
M[[1]] = array(0,dim=dimen)
M[[2]] = B2

vec_x=matrix(rnorm(n*prod(dimen)),ncol=n)
X=array(list(),n)
for (i in 1:n){
  X[[i]] = array(vec_x[,i],dim=dimen)
  X[[i]] = M[[y[i]]] + X[[i]]
}

mytune = tune_lamb(X, K=2, seqlamb=seq(0.01,0.1,by=0.01))

azuryee/TensorClustering documentation built on June 28, 2021, 8:06 p.m.