rf_classifier.projector {multivarious}R Documentation

create a random forest classifier

Description

create a random forest classifier

Usage

## S3 method for class 'projector'
rf_classifier(x, colind = NULL, labels, scores, ...)

Arguments

x

the model object

colind

the (optional) column indices used for prediction

labels

A factor or vector of class labels for the training data.

scores

a matrix of references scores used for classification

...

extra arguments to randomForest function

Value

a rf_classifier object

Examples

data(iris)
X <- iris[,1:4]
pcres <- pca(as.matrix(X),2)
cfier <- rf_classifier(pcres, labels=iris[,5], scores=scores(pcres))
p <- predict(cfier, new_data=as.matrix(iris[,1:4]))

[Package multivarious version 0.2.0 Index]