Learn R Programming

GeneticTools (version 0.3.1)

predict.mdr: Calculates MDR Ensemble Classifier

Description

This is an mdr ensemble classifier.

Usage

"predict"(object, data=NULL, status=NULL, fold=NULL, ...)

Arguments

object
Object of class mdr.
data
The new data object.
status
Optional, used for 2x2 classification table.
fold
Considered dimension of the model.
...
Additional parameters

Value

A vector, giving for each subject from the new data object a classification.

Details

Given an mdr object this function takes the top list for the (highest) fold group and uses it as an ensemble classifier for the new data given in the data argument.

Examples

Run this code
# indices <- 1:nrow(genotData)
# trainSet <- sample(indices,100)
# testSet <- indices[-trainSet]
# temp <- recodeData(genotData)
# res <- mdr(X=temp[trainSet,], status=status[trainSet], fold=3, top=20)

# trainRes <- predict(res, data=temp[trainSet,])
# testRes <- predict(res, data=temp[testSet,])

Run the code above in your browser using DataLab