chooseK: Choosing the number of clusters

View source: R/extractors.R

chooseKR Documentation

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"))

Arguments

bnlist

list of objects of class 'bnclustOmics'

fun

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

Value

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

Examples

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")

bnClustOmics documentation built on Aug. 5, 2022, 5:11 p.m.