Description Usage Arguments Value References
This function allow the user to train the BLNN object. The user can choose from three training algorithms. "NUTS" and "HMC" for Bayesian training method, see references for detailed description. The third option is "BFGS" for quasi-Newton method which is done through optim function.
1 2 3 4 5 |
NET |
the BLNN object which is created using |
x |
A matrix or data frame of covariates. it is preferred that continuous variables are scaled before training. |
y |
response or target values. A vector for one unit in the output layer, or a matrix/dataframe for more than one unit in the output layer. |
iter |
is the number of samples to draw from the Posterior distribution. In case of "BFGS" algorithm it is the number of iterations. |
init |
A list of vectors containing the initial parameters values or a function. It is strongly recommended to have a different vector for each chain |
chains |
Number of chains to run. Needed for Bayesian training only. |
seeds |
A vector of seeds. One for each chain. |
warmup |
The number of warmup iterations/samples. Default is half the number of iter. |
thin |
The thinning rate to apply to samples |
parallel |
A boolean value to check whether to use Parallel cores or not. Snowfall package is needed if TRUE. |
cores |
Number of cores to be used if parallel is TRUE. |
algorithm |
choose one algorithm from three c("NUTS", "HMC", "BFGS"). NUTS for the NO-U-Turn algorithm, HMC for Hamiltonian Markov chain sampler. See references below for detailed descriptions of each algorithm. The BFGS for quasi-Newton algorithm. |
evidence |
A boolean value to use the evidence procedure for re-estimating the Hyper-parameters. |
ev.x |
matrix/dataframe of covariates to be used in evidence procedure. Prefered to be historical data or part of the current training data. If left blank while evidence is TRUE, x will be used. |
ev.y |
vector/matrix of targets to be used in evidence procedure. If left blank while evidence is TRUE, y will be used. |
ev.iter |
number of iterations in evidence procedure, see references for more detials. Default is set to 1. |
control |
A list containing several control arguments needed for tunning NUTS and HMC. These arguments are:
|
display |
Help track the sampler algorithm by displaying several results. Value |
In case of BFGS algorithm the return is the trained BLNN object. In case of NUTS or HMC the returned is a list containing the posterior samples and other algorithm details such as stepsize, acceptance probabilities, effective sample size, Rhat, among others.
Neal, R. M. (2011). MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo.
Hoffman and Gelman (2014). The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res. 15:1593-1623.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.