Learn R Programming

MixAll (version 1.2.0)

clusterKernel: Create an instance of the [ClusterKernel] class

Description

This function computes the optimal kernel mixture model according to the [criterion] among the number of clusters given in [nbCluster], using the strategy specified in [strategy].

Usage

clusterKernel(data, dim = 10, nbCluster = 2, models = "kernelGaussian_pk_s", kernelName = "gaussian", kernelParameters = 1, strategy = clusterStrategy(), criterion = "ICL", nbCore = 1)

Arguments

data
frame or matrix containing the data. Rows correspond to observations and columns correspond to variables.
dim
integer giving the dimension of the Gaussian density. Default is 10.
nbCluster
[vector] listing the number of clusters to test.
models
[vector] of model names to run. By default only "kernelGaussian_pk_s" is estimated. All the model names are given by the method [clusterKernelNames].
kernelName
string with a kernel name. Possible values: "gaussian", "polynomial", "exponential", "linear", "hamming". Default is "gaussian".
kernelParameters
[vector] with the parameters of the chosen kernel. Default is 1.
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". Default is "ICL".
nbCore
integer defining the number of processor to use (default is 1, 0 for all).

Value

An instance of the [ClusterKernel] class.

Examples

Run this code
## A quantitative example with the famous geyser data set
data(bullsEye)
## estimate model (using fast strategy, results may be misleading)
model <- clusterKernel( data=bullsEye[,1:2], nbCluster=2:3
                      , models= "kernelGaussian_pk_s"
                      )

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

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

Run the code above in your browser using DataLab