plot.fem: The plot function for 'fem' objects.

Description Usage Arguments See Also Examples

View source: R/plot.fem.R

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

1
2
 ## 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

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

Example output

Loading required package: MASS
Loading required package: elasticnet
Loading required package: lars
Loaded lars 1.2

* Model: the chosen model is AkB with K = 4 ( icl = 2201.53 )
* Loading matrix:
                     U1          U2         U3
Sepal.Length -0.3010876 -0.50241546  0.2799094
Sepal.Width  -0.4475662  0.78770792 -0.1466641
Petal.Length  0.6696130  0.02972685 -0.5574864
Petal.Width   0.5105382  0.35526222  0.7676909
[1] 0.8067851

FisherEM documentation built on May 29, 2017, 4:22 p.m.