plot.mModel: Plotting a Graphical Visualization of a Gaussian Model or a...

Description Usage Arguments Details Author(s) References Examples

View source: R/plot.bgmm.r

Description

The generic function plot is used to visualize the data set and Gaussian model components fitted to this data. On the resulting plot the observations without labels are presented with black points, whereas the labeled observations are marked by different colors and different symbols. The fitted Gaussian components are represented by ellipses into the two-dimensional case and by densities in the one dimensional case. If data has more than two dimensions thus graphs are presented on the subspace generated by first two PCA components. Note that the estimation is done in higher dimension and the reduction to 2D is done only for illustration. That gives different results than data reduction prior to modeling process.

Usage

1
2
## S3 method for class 'mModel'
plot(x, ...)

Arguments

x

an object of the class mModel.

...

graphical arguments that are passed to the underlying plot() function.

Details

For one dimensional data the width of the density corresponds to standard deviation of the fitted Gaussian component. Fitted means are marked by vertical dashed lines.

For two dimensional data ellipses represents covariances for the corresponding model components.

For more dimensional points and ellipses are projected into 2D subspace spanned by first two PCA components.

Author(s)

Przemyslaw Biecek

References

Przemyslaw Biecek, Ewa Szczurek, Martin Vingron, Jerzy Tiuryn (2012), The R Package bgmm: Mixture Modeling with Uncertain Knowledge, Journal of Statistical Software.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 data(genotypes)
 modelSupervised = supervised(knowns=genotypes$knowns, class=genotypes$labels)
 plot(modelSupervised)

 # semi-supervised modeling
 modelSemiSupervised = semisupervised(X=genotypes$X, knowns=genotypes$knowns,
                           class = genotypes$labels)
 plot(modelSemiSupervised)

 # belief-based modeling
 modelBelief = belief(X=genotypes$X, knowns=genotypes$knowns, B=genotypes$B)
 plot(modelBelief)

 # soft-label modeling
 modelSoft = soft(X=genotypes$X, knowns=genotypes$knowns, P=genotypes$B)
 plot(modelSoft)

 # unsupervised modeling
 modelUnSupervised = unsupervised(X=genotypes$X, k=3)
 plot(modelUnSupervised)

Example output

Loading required package: mvtnorm
Loading required package: car
Loading required package: lattice
Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

bgmm documentation built on Oct. 10, 2021, 5:07 p.m.