predict.pls: Classify Observations using Penalized Discriminant Methods

Description Usage Arguments Value Author(s) References Examples

View source: R/pdmclass.R

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

1
2
3
4
## S3 method for class 'pls'
predict(object, x, ...)
## S3 method for class 'svd'
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.

Author(s)

Debashis Ghosh

References

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

Examples

1
2
3
4
5
6
7
library(fibroEset)
data(fibroEset)
y <- as.numeric(pData(fibroEset)[,2])
x <- t(exprs(fibroEset))
genes <- featureNames(fibroEset)
tmp <- pdmClass(y ~ x)
predict(tmp)

pdmclass documentation built on Nov. 17, 2017, 12:19 p.m.