View source: R/prtree_predict.R
| predict.prtree | R Documentation |
Obtains predictions from a fitted prtree object.
## S3 method for class 'prtree'
predict(object, newdata, complete = FALSE, ...)
object |
An object of class |
newdata |
A numeric matrix or data frame containing new data for
which to generate predictions. Must contain the exact same number and
order of predictor variables as the data used to fit the model.
It can contain missing values ( |
complete |
Logical. If |
... |
further arguments passed to or from other methods. |
If complete = FALSE, a numeric vector of predicted values (yhat).
If complete = TRUE, a list containing:
yhat |
The numeric vector of predicted values. |
P |
The probability matrix for the new data. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.