MixmodPredict-class: Constructor of ['MixmodPredict'] class

MixmodPredict-classR Documentation

Constructor of [MixmodPredict] class

Description

This is a class to run discriminant analysis with mixmod.

Details

data

numeric vector, matrix, or data frame of observations. Either qualitative or quantitative.

dataType

character. It defines whether data are quantitative or qualitative.

nbVariable

integer. The number of variables.

nbSample

integer. The number of observations.

error

a character. The mixmod error.

classificationRule

a [MixmodResults] object containing the classification rule.

partition

a matrix containing observations to predict.

proba

a matrix of probabilities.

Examples

# start by extract 10 observations from iris data set
remaining.obs <- sample(1:nrow(iris), 10)

# then run a mixmodLearn() analysis without those 10 observations
learn <- mixmodLearn(iris[-remaining.obs, 1:4], iris$Species[-remaining.obs])
# create a MixmodPredict to predict those 10 observations
new("MixmodPredict", data = iris[remaining.obs, 1:4], classificationRule = learn["bestResult"])

getSlots("MixmodPredict")

Rmixmod documentation built on May 29, 2024, 7:32 a.m.