summary.MclustDA: Summarizing discriminant analysis based on Gaussian finite...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mclustda.R

Description

Summary method for class "MclustDA".

Usage

1
2
3
4
## S3 method for class 'MclustDA'
summary(object, parameters = FALSE, newdata, newclass, ...)
## S3 method for class 'summary.MclustDA'
print(x, digits = getOption("digits"), ...)

Arguments

object

An object of class 'MclustDA' resulting from a call to MclustDA.

x

An object of class 'summary.MclustDA', usually, a result of a call to summary.MclustDA.

parameters

Logical; if TRUE, the parameters of mixture components are printed.

newdata

A data frame or matrix giving the test data.

newclass

A vector giving the class labels for the observations in the test data.

digits

The number of significant digits to use when printing.

...

Further arguments passed to or from other methods.

Value

The function summary.MclustDA computes and returns a list of summary statistics of the estimated MclustDA or EDDA model for classification.

Author(s)

Luca Scrucca

See Also

MclustDA, plot.MclustDA.

Examples

1
2
3
mod = MclustDA(data = iris[,1:4], class = iris$Species)
summary(mod)
summary(mod, parameters = TRUE)

Example output

Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
------------------------------------------------
Gaussian finite mixture model for classification 
------------------------------------------------

MclustDA model summary:

 log.likelihood   n df       BIC
      -182.9208 150 42 -576.2884
            
Classes       n Model G
  setosa     50   XXX 1
  versicolor 50   XXX 1
  virginica  50   XXX 1

Training classification summary:

            Predicted
Class        setosa versicolor virginica
  setosa         50          0         0
  versicolor      0         48         2
  virginica       0          1        49

Training error = 0.02 
------------------------------------------------
Gaussian finite mixture model for classification 
------------------------------------------------

MclustDA model summary:

 log.likelihood   n df       BIC
      -182.9208 150 42 -576.2884
            
Classes       n Model G
  setosa     50   XXX 1
  versicolor 50   XXX 1
  virginica  50   XXX 1

Estimated parameters:

Class = setosa

Mixing probabilities: 1 

Means:
              [,1]
Sepal.Length 5.006
Sepal.Width  3.428
Petal.Length 1.462
Petal.Width  0.246

Variances:
[,,1]
             Sepal.Length Sepal.Width Petal.Length Petal.Width
Sepal.Length     0.121764    0.097232     0.016028    0.010124
Sepal.Width      0.097232    0.140816     0.011464    0.009112
Petal.Length     0.016028    0.011464     0.029556    0.005948
Petal.Width      0.010124    0.009112     0.005948    0.010884

Class = versicolor

Mixing probabilities: 1 

Means:
              [,1]
Sepal.Length 5.936
Sepal.Width  2.770
Petal.Length 4.260
Petal.Width  1.326

Variances:
[,,1]
             Sepal.Length Sepal.Width Petal.Length Petal.Width
Sepal.Length     0.261104     0.08348      0.17924    0.054664
Sepal.Width      0.083480     0.09650      0.08100    0.040380
Petal.Length     0.179240     0.08100      0.21640    0.071640
Petal.Width      0.054664     0.04038      0.07164    0.038324

Class = virginica

Mixing probabilities: 1 

Means:
              [,1]
Sepal.Length 6.588
Sepal.Width  2.974
Petal.Length 5.552
Petal.Width  2.026

Variances:
[,,1]
             Sepal.Length Sepal.Width Petal.Length Petal.Width
Sepal.Length     0.396256    0.091888     0.297224    0.048112
Sepal.Width      0.091888    0.101924     0.069952    0.046676
Petal.Length     0.297224    0.069952     0.298496    0.047848
Petal.Width      0.048112    0.046676     0.047848    0.073924

Training classification summary:

            Predicted
Class        setosa versicolor virginica
  setosa         50          0         0
  versicolor      0         48         2
  virginica       0          1        49

Training error = 0.02 

mclust documentation built on July 2, 2018, 9:03 a.m.