Learn R Programming

MixAll (version 1.5.10)

kmmMixedData: Create an instance of the [KmmMixedDataModel] class

Description

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

Usage

kmmMixedData(
  ldata,
  lmodels,
  nbCluster = 2,
  strategy = clusterStrategy(),
  criterion = "ICL",
  nbCore = 1
)

Value

An instance of the [KmmMixedDataModel] class.

Arguments

ldata

[list] containing the data sets (matrices and/or data.frames).

lmodels

a [list] of same length than data. It contains the model names, kernel names and kernel parameter names to use in order to fit each data set.

nbCluster

[vector] with the number of clusters to test.

strategy

a [ClusterStrategy] object containing the strategy to run. Default is clusterStrategy().

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).

Author

Serge Iovleff

Details

For each data set in data, we need to specify a list of parameters

Examples

Run this code

## An example with the bullsEye data set
data(bullsEye)
data(bullsEye.cat)
## with default values
ldata     <- list(bullsEye, bullsEye.cat)
modelcont <- list(modelName="kmm_pk_s", dim = 10, kernelName="Gaussian")
modelcat  <- list(modelName="kmm_pk_s", dim = 20, kernelName="Hamming", kernelParameters = c(0.6))
lmodels   <- list( modelcont, modelcat)

model <- kmmMixedData(ldata, lmodels, nbCluster=2:5, strategy = clusterFastStrategy())

## get summary
summary(model)


if (FALSE) {
## use graphics functions
plot(model)
}

Run the code above in your browser using DataLab