Description Usage Arguments Value
View source: R/class_prob_rf.R
This function takes a regression randomForest and returns class probabilities for a provided classifcation. These probabilities are based on a full, new dataset. If using the dataset used to build the random forest these are not out of bag estimates. The predicted classes that are output are directly from the random forest object, thus they are predictions resulting from the out of bag esimates.
1 2 3 4 5 6 7 8 |
rf_obj |
a randomForest object of type regression |
newdata |
data frame used to make predictions. Can be same as original data. |
breaks |
a numeric vector of values used to turn predictions into classes |
labels |
a character vector of labels for the classes |
ordered |
logical indicating if categories are ordered (in order specified in labels) |
type |
a character vector indicating whether total votes or probabilites should be returned |
returns a dataframe of probabilites or number of votes for each class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.