Learn R Programming

pdmclass (version 1.44.0)

predict.pls: Classify Observations using Penalized Discriminant Methods

Description

These are functions that can be used to classify new samples (a test set) based on an existing classifier created using a training set.

Usage

"predict"(object, x, ...) "predict"(object, x, ...)

Arguments

object
An object created by a call to pdmClass.
x
A matrix of new observations in which rows are samples and columns are genes. If not supplied, prediction will be performed on the original training set.
...
Other variables passed to predict.

Value

A vector of predicted class assignments.

References

http://www.sph.umich.edu/~ghoshd/COMPBIO/POPTSCORE

Examples

Run this code
library(fibroEset)
data(fibroEset)
y <- as.numeric(pData(fibroEset)[,2])
x <- t(exprs(fibroEset))
genes <- featureNames(fibroEset)
tmp <- pdmClass(y ~ x)
predict(tmp)

Run the code above in your browser using DataLab