View source: R/Sampler_iKernel.R
sampler_MaxWiK | R Documentation |
Function to generate parameters and simulate a model based on MaxWiK algorithm
sampler_MaxWiK(
stat.obs,
stat.sim,
par.sim,
model,
arg0 = list(),
size = 500,
psi_t,
epsilon,
nmax = 100,
include_top = FALSE,
slowly = FALSE,
rate = 0.2,
n_simulation_stop = NA,
check_err = TRUE,
include_web_rings = TRUE,
number_of_nodes_in_ring = 2
)
sampler_MaxWiK_parallel(
stat.obs,
stat.sim,
par.sim,
model,
arg0 = list(),
size = 500,
psi_t,
epsilon,
nmax = 100,
include_top = FALSE,
slowly = FALSE,
rate = 0.2,
n_simulation_stop = NA,
check_err = TRUE,
include_web_rings = TRUE,
number_of_nodes_in_ring = 2,
cores = 4
)
stat.obs |
Summary statistics of the observation point |
stat.sim |
Summary statistics of the simulations (model output) |
par.sim |
Data frame of parameters of the model |
model |
Function to get output of simulation during sampling |
arg0 |
List with arguments for a model function, so that arg0 is NOT changed during sampling |
size |
Number of points in the simulation based on MaxWiK algorithm |
psi_t |
Vector of psi and t hyperparameters. |
epsilon |
Criterion to stop simulation when |
nmax |
Maximal number of iterations |
include_top |
Logical to include top points (network) from |
slowly |
Logical for two algorithms: slow and fast seekers in sampling |
rate |
Rate value in the range |
n_simulation_stop |
Maximal number of simulations to stop sampling.
If |
check_err |
Logical parameter to check epsilon or do not |
include_web_rings |
Logical to include or do not include the cobweb rings to the simulations |
number_of_nodes_in_ring |
Number of points/nodes between two points in the web ring. By default |
cores |
Number of cores for parallel calculations of a model (4 by default) |
sampler_MaxWiK()
returns the list:
results: results of all the simulations;
best: the best value of parameter;
MSE_min: minimum of MSE;
number_of_iterations: number of iterations;
time: time of sampling in seconds,
n_simulations: the total number of simulations.
sampler_MaxWiK_parallel()
returns the same output as in sampler_MaxWiK()
.
sampler_MaxWiK_parallel()
: Function to generate parameters and simulate a model based on MaxWiK algorithm
MaxWiK::MaxWiK_templates(dir = tempdir()) # See the template 'MaxWiK.Sampling.R'
# and vignettes for usage.
MaxWiK::MaxWiK_templates(dir = tempdir()) # See the template 'MaxWiK.Sampling.R'
# and vignettes for usage. For parallel implementation
# change the function 'sampler_MaxWiK()' to 'sampler_MaxWiK_parallel()'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.