Last data update: 2014.03.03

R: The plot function for 'fem' objects.
plot.femR Documentation

The plot function for 'fem' objects.

Description

This function plots different information about 'fem' objects such as model selection, log-likelihood evolution and visualization of the clustered data into the discriminative subspace fitted by the Fisher-EM algorithm.

Usage

 ## S3 method for class 'fem'
plot(x, frame=0, crit=c(),...)

Arguments

x

The fem object.

frame

0: all plots; 1: selection of the number of groups; 2: log-likelihood; projection of the data into the discriminative subspace.

crit

The model selection criterion to display. Default is the criterion used in the 'fem' function ('icl' by default).

...

Additional options to pass to the plot function.

See Also

fem, sfem, fem.ari, summary.fem

Examples

data(iris)
res = fem(iris[,-5],K=2:5,model='AkB')
summary(res)
plot(res)
fem.ari(res,as.numeric(iris[,5]))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FisherEM)
Loading required package: MASS
Loading required package: elasticnet
Loading required package: lars
Loaded lars 1.2

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FisherEM/plot.fem.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.fem
> ### Title: The plot function for 'fem' objects.
> ### Aliases: plot.fem
> 
> ### ** Examples
> 
> data(iris)
> res = fem(iris[,-5],K=2:5,model='AkB')
> summary(res)
* Model: the chosen model is AkB with K = 5 ( icl = 2250.162 )
* Loading matrix:
                     U1         U2         U3
Sepal.Length -0.3078638 -0.2776052 -0.4979237
Sepal.Width  -0.4601867  0.5161905  0.6036463
Petal.Length  0.7217695 -0.2354164  0.4310403
Petal.Width   0.4153274  0.7752818 -0.4493188
> plot(res)
> fem.ari(res,as.numeric(iris[,5]))
[1] 0.735431
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>