| predict.bnns | R Documentation |
Predictions from a fitted Bayesian Neural Network
## S3 method for class 'bnns'
predict(
object,
newdata = NULL,
type = c("samples", "mean", "median", "quantile", "prob", "class"),
quantiles = c(0.025, 0.975),
...
)
object |
A fitted |
newdata |
A data frame containing new data for prediction. If not provided, the predictions will be generated using the training data. |
type |
Character string indicating the type of prediction.
Options are |
quantiles |
Numeric vector of probabilities used when |
... |
Additional arguments passed to internal prediction methods. |
For type = "samples": A matrix (regression/binary) or 3D array (multiclass) of posterior predictions.
For type = "mean" or "median": A vector or matrix of aggregated predictions. For classification tasks, type = "mean" returns the posterior mean class probabilities.
For type = "quantile": A matrix or array of quantiles.
For type = "prob": A matrix of class probabilities (for classification models).
For type = "class": A vector of predicted class labels (for classification models).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.