predict.rf_classifier | R Documentation |
Predicts class labels and probabilities for new data using a fitted rf_classifier
object.
This method projects the new_data
into the component space and then uses the stored
randomForest
model to predict outcomes.
## S3 method for class 'rf_classifier'
predict(object, new_data, ncomp = NULL, colind = NULL, ...)
object |
A fitted object of class |
new_data |
A numeric matrix or vector of new observations to classify. Rows are observations,
columns are variables matching the original data space used by the projector OR matching |
ncomp |
Optional integer; the number of components to use from the projector for classification (default: all components used during classifier creation). |
colind |
Optional numeric vector specifying column indices from the original data space.
If provided, |
... |
Extra arguments passed to |
A list containing:
class |
Predicted class labels (typically factor) from the random forest model. |
prob |
A numeric matrix of predicted class probabilities from the random forest model. |
rf_classifier.projector
, predict.randomForest
Other classifier predict:
predict.classifier()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.