Last data update: 2014.03.03

R: Prediction method for 'hdmda' class objects.
predict.hdmdaR Documentation

Prediction method for ‘hdmda’ class objects.

Description

This function computes the class prediction of a dataset with respect to the model-based supervised classification method hdmda.

Usage

## S3 method for class 'hdmda'
predict(object, X, ...)

Arguments

object

An object of class ‘hdmda’.

X

A matrix or a data frame of observations, assuming the rows are the observations and the columns the variables. Note that NAs are not allowed.

...

Arguments based from or to other methods. Not currently used.

Value

class

vector of the predicted class.

posterior

The matrix of the probabilities to belong to a class for each observation and each class.

Author(s)

Laurent Berge, Charles Bouveyron and Stephane Girard

References

C. Bouveyron and C. Brunet (2014), “Model-based clustering of high-dimensional data: A review”, Computational Statistics and Data Analysis, vol. 71, pp. 52-78.

Bouveyron, C. Girard, S. and Schmid, C. (2007), “High Dimensional Discriminant Analysis”, Communications in Statistics: Theory and Methods, vol. 36 (14), pp. 2607-2623.

Bouveyron, C. Celeux, G. and Girard, S. (2011), “Intrinsic dimension estimation by maximum likelihood in probabilistic PCA”, Pattern Recognition Letters, vol. 32 (14), pp. 1706-1713.

Berge, L. Bouveyron, C. and Girard, S. (2012), “HDclassif: An R Package for Model-Based Clustering and Discriminant Analysis of High-Dimensional Data”, Journal of Statistical Software, 46(6), pp. 1-29, url: http://www.jstatsoft.org/v46/i06/.

Hastie, T., & Tibshirani, R. (1996), “Discriminant analysis by Gaussian mixtures”, Journal of the Royal Statistical Society, Series B (Methodological), pp. 155-176.

See Also

hdmda

Examples

# Load the Wine data set
data(wine)
cls = wine[,1]; X = scale(wine[,-1])

# A simple use...
out = hdmda(X[1:100,],cls[1:100])
res = predict(out,X[101:nrow(X),])

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(HDclassif)
Loading required package: MASS
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HDclassif/predict.hdmda.Rd_%03d_medium.png", width=480, height=480)
> ### Name: predict.hdmda
> ### Title: Prediction method for 'hdmda' class objects.
> ### Aliases: predict.hdmda
> ### Keywords: ~kwd1 ~kwd2
> 
> ### ** Examples
> 
> # Load the Wine data set
> data(wine)
> cls = wine[,1]; X = scale(wine[,-1])
> 
> # A simple use...
> out = hdmda(X[1:100,],cls[1:100])
> res = predict(out,X[101:nrow(X),])
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>