Learn R Programming

Rmixmod (version 2.1.10)

print: Print a Rmixmod class to standard output.

Description

Print a Rmixmod class to standard output.

Usage

# S4 method for Model
print(x, ...)

# S4 method for MultinomialParameter print(x, ...)

# S4 method for GaussianParameter print(x, ...)

# S4 method for CompositeParameter print(x, ...)

# S4 method for MixmodResults print(x, ...)

# S4 method for Mixmod print(x, ...)

# S4 method for Strategy print(x, ...)

# S4 method for MixmodCluster print(x, ...)

# S4 method for MixmodDAResults print(x, ...)

# S4 method for MixmodLearn print(x, ...)

# S4 method for MixmodPredict print(x, ...)

Value

NULL. Prints to standard out.

Arguments

x

a Rmixmod object: a Strategy, a Model, a GaussianParameter, a MultinomialParameter, a MixmodResults, a MixmodCluster, a MixmodLearn or a MixmodPredict.

...

further arguments passed to or from other methods

See Also

Examples

Run this code
## for strategy
strategy <- mixmodStrategy()
print(strategy)

## for Gaussian models
gmodel <- mixmodGaussianModel()
print(gmodel)
## for multinomial models
mmodel <- mixmodMultinomialModel()
print(mmodel)

## for clustering
data(geyser)
xem <- mixmodCluster(geyser, 3)
print(xem)
## for Gaussian parameters
print(xem["bestResult"]["parameters"])

## for discriminant analysis
# start by extract 10 observations from iris data set
iris.partition <- sample(1:nrow(iris), 10)
# then run a mixmodLearn() analysis without those 10 observations
learn <- mixmodLearn(iris[-iris.partition, 1:4], iris$Species[-iris.partition])
# print learn results
print(learn)
# create a MixmodPredict to predict those 10 observations
prediction <- mixmodPredict(
  data = iris[iris.partition, 1:4],
  classificationRule = learn["bestResult"]
)
# print prediction results
print(prediction)

Run the code above in your browser using DataLab