plotCrit: Plot BIC and ICL

View source: R/PLOT_plotCrit.R

plotCritR Documentation

Plot BIC and ICL

Description

Plot BIC and ICL with regards to the number of classes

Usage

plotCrit(output, crit = c("BIC", "ICL"), pkg = c("ggplot2", "plotly"), ...)

Arguments

output

MixtCompLearn object

crit

criterion to plot (can be "BIC", "ICL" or c("BIC", "ICL") (default))

pkg

"ggplot2" or "plotly". Package used to plot

...

arguments to be passed to plot_ly

Value

ggplot2 or plotly object

Author(s)

Quentin Grimonprez

See Also

Other plot: plot.MixtCompLearn()

Examples

data(iris)

# define the algorithm's parameters
algo <- createAlgo()

# keep only 3 variables
model <- list(
  Petal.Width = "Gaussian", Petal.Length = "Gaussian",
  Sepal.Width = "Gaussian", Sepal.Length = "Gaussian"
)

# run RMixtComp in unsupervised clustering mode + data as matrix
res <- mixtCompLearn(iris, model, algo, nClass = 1:4, nCore = 1)

# plot
plotCrit(res)


RMixtComp documentation built on July 9, 2023, 6:06 p.m.