R: Constructor of ['MixmodPredict'] class

MixmodPredict-class {Rmixmod} | R 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")

[Package Rmixmod version 2.1.2.2 Index]