predict.SDForest | R Documentation |
Predicts the response for new data using a fitted SDForest.
## S3 method for class 'SDForest'
predict(object, newdata, mc.cores = 1, ...)
object |
Fitted object of class |
newdata |
New test data of class |
mc.cores |
Number of cores to use for parallel processing,
if |
... |
Further arguments passed to or from other methods. |
A vector of predictions for the new data.
Markus Ulmer
SDForest
set.seed(1)
n <- 50
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + rnorm(n)
model <- SDForest(x = X, y = y, Q_type = 'no_deconfounding', nTree = 5, cp = 0.5)
predict(model, newdata = data.frame(X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.