clusterDiagGaussian: Create an instance of the ['ClusterDiagGaussian'] class

Description Usage Arguments Value Author(s) Examples

View source: R/ClusterDiagGaussian.R

Description

This function computes the optimal diagonal Gaussian mixture model according to the criterion among the list of model given in models and the number of clusters given in nbCluster, using the strategy specified in strategy.

Usage

1
2
3
clusterDiagGaussian(data, nbCluster = 2,
  models = clusterDiagGaussianNames(), strategy = clusterStrategy(),
  criterion = "ICL", nbCore = 1)

Arguments

data

frame or matrix containing the data. Rows correspond to observations and columns correspond to variables. If the data set contains NA values, they will be estimated during the estimation process.

nbCluster

[vector] listing the number of clusters to test.

models

[vector] of model names to run. By default all diagonal Gaussian models are estimated. All the model names are given by the method [clusterDiagGaussianNames].

strategy

a [ClusterStrategy] object containing the strategy to run. [clusterStrategy]() method by default.

criterion

character defining the criterion to select the best model. The best model is the one with the lowest criterion value. Possible values: "BIC", "AIC", "ICL", "ML". Default is "ICL".

nbCore

integer defining the number of processors to use (default is 1, 0 for all).

Value

An instance of the [ClusterDiagGaussian] class.

Author(s)

Serge Iovleff

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## A quantitative example with the famous geyser data set
data(geyser)
## add 10 missing values as random
x = as.matrix(geyser); n <- nrow(x); p <- ncol(x);
indexes <- matrix(c(round(runif(5,1,n)), round(runif(5,1,p))), ncol=2);
x[indexes] <- NA;
## estimate model (using fast strategy, results may be misleading)
model <- clusterDiagGaussian( data=x, nbCluster=2:3
                            , models=c( "gaussian_pk_sjk")
                            , strategy = clusterFastStrategy()
                            )

## use graphics functions
## Not run: 
plot(model)

## End(Not run)

## get summary
summary(model)
## print model
## Not run: 
print(model)

## End(Not run)
## get estimated missing values
missingValues(model)

MixAll documentation built on Sept. 12, 2019, 5:05 p.m.