Learn R Programming

bnns (version 0.1.2)

print.bnns: Print Method for "bnns" Objects

Description

Displays a summary of a fitted Bayesian Neural Network (BNN) model, including the function call and the Stan fit details.

Usage

# S3 method for bnns
print(x, ...)

Value

The function is called for its side effects and does not return a value. It prints the following:

  • The function call used to generate the "bnns" object.

  • A summary of the Stan fit object stored in x$fit.

Arguments

x

An object of class "bnns", typically the result of a call to bnns.default.

...

Additional arguments (currently not used).

See Also

bnns, summary.bnns

Examples

Run this code
# \donttest{
# Example usage:
data <- data.frame(x1 = runif(10), x2 = runif(10), y = rnorm(10))
model <- bnns(y ~ -1 + x1 + x2,
  data = data, L = 1, nodes = 2, act_fn = 2,
  iter = 1e1, warmup = 5, chains = 1
)
print(model)
# }

Run the code above in your browser using DataLab