rf_classifier.projector | R Documentation |
create a random forest classifier
## S3 method for class 'projector'
rf_classifier(x, colind = NULL, labels, scores, ...)
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 |
a rf_classifier
object
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]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.