Description Usage Arguments Value
View source: R/SVGD_bayesian_nn.R
Main Function
1 2 3 4 5 6 7 8 9 10 11 12 13 |
X_train |
The training dataset variables, a matrix with rows representing observations and columns representing covariates. |
y_train |
The training dataset outcomes, a vector with the length same as the number of rows of 'X_train'. |
eigenMat |
the variance matrix of the outcome |
X_test |
The testing data set variables, a matrix with the same number of columns as 'X_train'. |
y_test |
The testing dataset outcomes, a vector with the length same as the number of rows of 'X_test'. |
M |
The number of particles. |
num_nodes |
The number of nodes in each hidden layer (does not include the last layer, because the node in the last layer is always 1). |
a0 |
a0, for the prior distribution of lambda and gamma. |
b0 |
b0, for the prior distribution of lambda and gamma. |
batch_size |
The batch size. |
max_iter |
The maximum number of iterations. |
master_stepsize |
The master stepsize, which is needed to adjust convergence if using adagrad for optimization of the NN. |
auto_corr |
The auto correlation, which is needed to adjust convergence if using adagrad for optimization of the NN. |
method |
The optimization method to be used. |
use_autodiff |
Whether to use autodiffr, default to FALSE. |
A list containing:
theta: The estimated parameters in the vector format.
scaling_coef: The scaling coefficient
svgd_rmse: The RMSE on the training data
svgd_11: log likelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.