A three letter string indicating the type of distribution to be fit.
ncov
A small integer indicating the type of covariance structure.
pro
A vector of mixing proportions
mu
A numeric matrix with each column corresponding to the mean
sigma
An array of dimension (p,p,g) with first two dimension corresponding covariance matrix of each component
dof
A vector of degrees of freedom for each component
delta
A p by g matrix with each column corresponding to a skew parameter vector
clust
A vector of partition
Value
ICL
ICL value
References
Biernacki C. Celeux G., and Govaert G. (2000). Assessing a Mixture Model for Clustering with the integrated Completed Likelihood. IEEE Transactions on Pattern Analysis and Machine Intelligence. 22(7). 719-725.
Examples
n1=300;n2=300;n3=400;
nn <-c(n1,n2,n3)
n=1000
p=2
ng=3
sigma<-array(0,c(2,2,3))
for(h in 2:3) sigma[,,h]<-diag(2)
sigma[,,1]<-cbind( c(1,0),c(0,1))
mu <- cbind(c(4,-4),c(3.5,4),c( 0, 0))
pro <- c(0.3,0.3,0.4)
distr="mvn"
ncov=3
#first we generate a data set
set.seed(111) #random seed is set
dat <- rdemmix(nn,p,ng,distr,mu,sigma,dof=NULL,delta=NULL)
#start from initial partition
clust<- rep(1:ng,nn)
obj <- EmSkewfit1(dat, ng, clust, distr, ncov, itmax=1000,epsilon=1e-4)
getICL(dat,n,p,ng, distr,ncov,obj$pro,obj$mu,obj$sigma,obj$dof,
obj$delta,obj$clust)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(EMMIXskew)
Loading required package: lattice
Loading required package: mvtnorm
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/EMMIXskew/getICL.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getICL
> ### Title: The ICL criterion
> ### Aliases: getICL
> ### Keywords: cluster datasets
>
> ### ** Examples
>
> n1=300;n2=300;n3=400;
> nn <-c(n1,n2,n3)
> n=1000
> p=2
> ng=3
>
>
> sigma<-array(0,c(2,2,3))
> for(h in 2:3) sigma[,,h]<-diag(2)
> sigma[,,1]<-cbind( c(1,0),c(0,1))
> mu <- cbind(c(4,-4),c(3.5,4),c( 0, 0))
>
> pro <- c(0.3,0.3,0.4)
>
> distr="mvn"
> ncov=3
>
> #first we generate a data set
> set.seed(111) #random seed is set
> dat <- rdemmix(nn,p,ng,distr,mu,sigma,dof=NULL,delta=NULL)
>
> #start from initial partition
> clust<- rep(1:ng,nn)
> obj <- EmSkewfit1(dat, ng, clust, distr, ncov, itmax=1000,epsilon=1e-4)
>
> getICL(dat,n,p,ng, distr,ncov,obj$pro,obj$mu,obj$sigma,obj$dof,
+ obj$delta,obj$clust)
$ICL
[1] -3948.115
>
>
>
>
>
>
> dev.off()
null device
1
>