plot.bfem {FisherEM}R Documentation

Plotting function

Description

Utility function to plot the results of the BFEM algorithm. The S3 plot function is a wrapper function over the 3 other functions

Usage

## S3 method for class 'bfem'
plot(x, type = "subspace", ...)

plot_subspace(
  x,
  alpha_levels = c(0.95),
  plot.dims = c(1, 2),
  show.ellipses = T,
  show.uncertainty = T,
  size = 2,
  cex.uncertainty = 1,
  ...
)

plot_bound(x, ...)

plot_crit(x, crit = NULL, ...)

Arguments

x

The results of bfem.

type

The plot type:

  • "subspace" (default) - Uses plot_subspace() to plot the projected data

  • "criterion" - Uses plot_crit() to plot the criterion value.

  • "elbo" - Uses plot_bound() to plot the variational lower bound evolution.

...

Additional parameter to pass to corxponding functions:

alpha_levels

A vector giving the desired Gaussian ellipses level set. Default to 0.95.

plot.dims

The dimension to be plotted. Default to the first two dimensions.

show.ellipses

Should Gaussian ellipses be plotted. Default to TRUE

show.uncertainty

Should uncertainty be plotted. A point is considered uncertain if its posterior probability of membership is peaked toward 2 or more clusters. Graphically, it can be displayed with a bigger point size depending on the uncertainty level, bigger points being more uncertain.

size

The point size.

cex.uncertainty

The multiplicative factor for the basic point size controlling the size of uncertain points.

crit

Used to specify which criterion should be plotted. Possible values are "aic", "bic" and 'icl. The default is the criterion used in the algorithm.

Value

a ggplot2 plot object

Functions

Examples


data(iris)
Y = iris[,-5]
res = bfem(Y, 3, model = 'DB')
gg = plot(x=res, type = "subspace")
print(gg)


[Package FisherEM version 1.6 Index]