Utility function to plot the results of the BFEM algorithm. The S3 plot function is a wrapper function over the 3 other functions
# S3 method for 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, ...)
The results of bfem
.
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:
A vector giving the desired Gaussian ellipses level set. Default to 0.95.
The dimension to be plotted. Default to the first two dimensions.
Should Gaussian ellipses be plotted. Default to TRUE
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.
The point size.
The multiplicative factor for the basic point size controlling the size of uncertain points.
Used to specify which criterion should be plotted. Possible values are "aic", "bic" and 'icl. The default is the criterion used in the algorithm.
a ggplot2 plot object
plot_subspace
: Plot Y projected on the `plot.dims` dimensions of the latent space
plot_bound
: plot the variational bound evolution
plot_crit
: Plot the criterion xult
# NOT RUN {
data(iris)
Y = iris[,-5]
res = bfem(Y, 3, model = 'DB')
gg = plot(x=res, type = "subspace")
print(gg)
# }
Run the code above in your browser using DataLab