Learn R Programming

sda (version 1.3.9)

predict.sda: Shrinkage Discriminant Analysis 3: Prediction Step

Description

predict.sda performs class prediction.

Usage

# S3 method for sda
predict(object, Xtest, verbose=TRUE, ...)

Value

predict.sda predicts class probabilities for each test sample and returns a list with two components:

class

a factor with the most probable class assignment for each test sample, and

posterior

a matrix containing the respective class posterior probabilities.

Arguments

object

An sda fit object obtained from the function sda.

Xtest

A matrix containing the test data set. Note that the rows correspond to observations and the columns to variables.

verbose

Report shrinkage intensities (sda) and number of used features (predict.sda).

...

Additional arguments for generic predict.

Author

Miiika Ahdesm\"aki and Korbinian Strimmer (https://strimmerlab.github.io).

See Also

sda, sda.ranking.

Examples

Run this code
# see the examples at the "sda" help page

Run the code above in your browser using DataLab