Learn R Programming

RMixtComp (version 4.0.2)

RMixtComp-package: RMixtComp

Description

MixtComp (Mixture Composer, https://github.com/modal-inria/MixtComp) is a model-based clustering package for mixed data.

It has been engineered around the idea of easy and quick integration of all new univariate models, under the conditional independence assumption. Five basic models (Gaussian, Multinomial, Poisson, Weibull, NegativeBinomial) are implemented, as well as two advanced models (Func_CS and Rank_ISR). MixtComp has the ability to natively manage missing data (completely or by interval).

Online SaaS version (not up-to-date): https://massiccc.lille.inria.fr/

Arguments

Details

Main functions are mixtCompLearn for clustering, mixtCompPredict for predicting the cluster of new samples with a model learnt with mixtCompLearn. createAlgo gives you default values for required parameters.

Read the help page of mixtCompLearn for available models and data format. A summary of these information can be accessed with the function availableModels.

All utility functions (getters, graphical) are in the RMixtCompUtilities package.

In order to have an overview of the output, you can use print.MixtCompLearn, summary.MixtCompLearn and plot.MixtCompLearn functions,

Getters are available to easily access some results (see. mixtCompLearn for output format): getBIC, getICL, getCompletedData, getParam, getTik, getEmpiricTik, getPartition, getType, getModel, getVarNames.

You can compute discriminative powers and similarities with functions: computeDiscrimPowerClass, computeDiscrimPowerVar, computeSimilarityClass, computeSimilarityVar.

Graphics functions are plot.MixtComp, plot.MixtCompLearn, heatmapClass, heatmapTikSorted, heatmapVar, histMisclassif, plotConvergence, plotDataBoxplot, plotDataCI, plotDiscrimClass, plotDiscrimVar, plotProportion, plotCrit.

Datasets with running examples are provided: titanic, CanadianWeather, prostate, simData.

See Also

mixtCompLearn availableModels RMixtCompUtilities, RMixtCompIO. Other clustering packages: Rmixmod, blockcluster

Examples

Run this code
# NOT RUN {
data(simData)
 
# define the algorithm's parameters: you can use createAlgo function
algo <- list(nbBurnInIter = 50,
             nbIter = 50,
             nbGibbsBurnInIter = 50,
             nbGibbsIter = 50,
             nInitPerClass = 20,
             nSemTry = 20,
             confidenceLevel = 0.95)

# run RMixtComp for learning using only 3 variables
resLearn <- mixtCompLearn(simData$dataLearn$matrix, simData$model$unsupervised[1:3], algo,
                          nClass = 2:3, nRun = 2, nCore = 1)

summary(resLearn)
plot(resLearn)

# run RMixtComp for predicting
resPred <- mixtCompPredict(simData$dataPredict$matrix, simData$model$unsupervised[1:3], algo,
                           resLearn)

partitionPred <- getPartition(resPred)
print(resPred)


# }

Run the code above in your browser using DataLab