View source: R/predict.logforest.R
| predict.logforest | R Documentation |
Computes predicted values for new observations or the out-of-bag (OOB) predictions
for a logic forest model fitted using logforest.
## S3 method for class 'logforest'
predict(object, newdata, cutoff, ...)
object |
An object of class |
newdata |
A matrix or data frame of new predictor values. If omitted, predictions are made for the original data used to fit the model (OOB predictions). |
cutoff |
A numeric value between 0 and 1 specifying the minimum proportion of trees that must predict a class of 1 for the overall prediction to be 1. Ignored for non-classification models. |
... |
Additional arguments (currently ignored). |
For classification models, predictions are determined based on the cutoff proportion.
For regression or time-to-event models, the function returns predicted values and OOB statistics if newdata is not provided.
An object of class "LFprediction" containing:
LFprediction: numeric vector of predicted responses.
proportion_one: numeric vector of the proportion of trees predicting class 1 (classification only).
AllTrees: matrix or data frame with predicted values from each tree,
the proportion of trees predicting 1, and the overall predicted class (classification),
or predicted values for regression/time-to-event models.
Bethany Wolf wolfb@musc.edu
logforest
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.