predict.SDAM | R Documentation |
Predicts the response for new data using a fitted SDAM.
## S3 method for class 'SDAM'
predict(object, newdata, ...)
object |
Fitted object of class |
newdata |
New test data of class |
... |
Further arguments passed to or from other methods. |
A vector of predictions for the new data.
Cyrill Scheidegger
SDAM
set.seed(1)
X <- matrix(rnorm(10 * 5), ncol = 5)
Y <- sin(X[, 1]) - X[, 2] + rnorm(10)
model <- SDAM(x = X, y = Y, Q_type = "trim", trim_quantile = 0.5, nfold = 2, n_K = 1)
predict(model, newdata = data.frame(X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.