predict.tsp.randomForest: prediction function for tsp.randomForest

Description Usage Arguments Author(s) References Examples

View source: R/LDCA.R

Description

prediction function for tsp.randomForest

Usage

1
2
## S3 method for class 'tsp.randomForest'
predict(object, newdata, type = "response", norm.votes = TRUE, predict.all = FALSE, proximity = FALSE, nodes = FALSE, cutoff, ...)

Arguments

object

a tsp.randomForest object

newdata

new data matrix

type

one of response, prob. or votes, indicating the type of output: predicted values, matrix of class probabilities, or matrix of vote counts. class is allowed, but automatically converted to ”response", for backward compatibility.

norm.votes

Should the vote counts be normalized (i.e., expressed as fractions)?

predict.all

Should the predictions of all trees be kept?

proximity

Should proximity measures be computed?

nodes

Should the terminal node indicators (an n by ntree matrix) be return? If so, it is in the ”nodes" attribute of the returned object.

cutoff

A vector of length equal to number of classes. The 'winning' class for an observation is the one with the maximum ratio of proportion of votes to cutoff.

...

not used.

Author(s)

Xiaolin Yang, Han Liu

References

randomForest package.

Examples

1
2
3
4
5
6
library(randomForest)
x=matrix(rnorm(100*20),100,20)
y=rbinom(100,1,0.5)
y=as.factor(y)
fit=tsp.randomForest(x,y)
predict(fit,x[1:10,])

BigTSP documentation built on May 2, 2019, 6:09 a.m.