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

Description Details Examples

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

1
2
3
4
5
6
7
8
9
  # 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 June 26, 2018, 5:02 p.m.