print.orf.prediction {orf} | R Documentation |
Print of the Ordered Forest Prediction
Description
print of Ordered Forest predictions of class orf.prediction
Usage
## S3 method for class 'orf.prediction'
print(x, ...)
Arguments
x |
predicted Ordered Forest object of class |
... |
further arguments (currently ignored) |
Details
print.orf.prediction
provides a first glimpse of the Ordered Forest
prediction, printed directly to the R
console. The printed information
contains the main inputs of the predict.orf
function.
Author(s)
Gabriel Okasa
Examples
# Ordered Forest
require(orf)
# load example data
data(odata)
# specify response and covariates for train and test
idx <- sample(seq(1, nrow(odata), 1), 0.8*nrow(odata))
# train set
Y_train <- as.numeric(odata[idx, 1])
X_train <- as.matrix(odata[idx, -1])
# test set
Y_test <- as.numeric(odata[-idx, 1])
X_test <- as.matrix(odata[-idx, -1])
# estimate Ordered Forest
orf_fit <- orf(X_train, Y_train)
# predict the probabilities with the estimated orf
orf_pred <- predict(orf_fit, newdata = X_test)
# print the prediction object
print(orf_pred)
[Package orf version 0.1.4 Index]