Learn R Programming

bnClustOmics (version 1.1.1)

chooseK: Choosing the number of clusters

Description

This function can be used for choosing the optimal number of clusters using AIC or BIC scores.

Usage

chooseK(bnlist, fun = c("AIC", "BIC", "likel"))

Value

a list consisting of a vector of scores extracted from each object of class bnclustOmics and the optimal k

Arguments

bnlist

list of objects of class 'bnclustOmics'

fun

score function for choosing the optimal number of clusters; available options are 'AIC' or 'BIC'

Examples

Run this code
bnlist<-list()

#bnlist[[k]]<-bnclustOmics(simdata,bnnames,maxEM=4, kclust=k,startpoint = "mclustPCA")
bnlist[[2]]<-bnres2
bnlist[[3]]<-bnres3
bnlist[[4]]<-bnres4

chooseK(bnlist,fun="BIC")
chooseK(bnlist,fun="AIC")

Run the code above in your browser using DataLab