meta_sampling | R Documentation |
The function meta_sampling()
iteratively generates tracer based on the simple procedure:
making a reflection of the top points from the best point,
and then generating the point tracers between them,
finally, the algorithm chooses again the top points and the best point (sudoku()
function is used),
repeat all the steps until condition to be TRUE
:
abs( min( sim_tracers ) - sim_previous ) < epsilon
The function MaxWiK.predictor()
uses the meta-sampling for a prediction
The function get.MaxWiK()
is used to get Approximate Bayesian Computation
based on Maxima Weighted Isolation Kernel mapping.
On given data frame of parameters, statistics of the simulations and an observation,
using the internal parameters psi and t,
the function get.MaxWiK()
returns the estimation of a parameter corresponding to
Maxima weighted Isolation Kernel ABC method.
meta_sampling(
psi = 4,
t = 35,
param,
stat.sim,
stat.obs,
talkative = FALSE,
check_pos_def = FALSE,
n_bullets = 16,
n_best = 10,
halfwidth = 0.5,
epsilon = 0.001,
rate = 0.1,
max_iteration = 15,
save_web = TRUE,
use.iKernelABC = NULL
)
MaxWiK.predictor(
psi = 4,
t = 35,
param,
stat.sim,
new.param,
talkative = FALSE,
check_pos_def = FALSE,
n_bullets = 16,
n_best = 10,
halfwidth = 0.5,
epsilon = 0.001,
rate = 0.1,
max_iteration = 15,
save_web = TRUE,
use.iKernelABC = NULL
)
get.MaxWiK(
psi = 40,
t = 350,
param,
stat.sim,
stat.obs,
talkative = FALSE,
check_pos_def = TRUE,
Matrix_Voronoi = NULL
)
psi |
Integer number. Size of each Voronoi diagram or number of areas/points in the Voronoi diagrams |
t |
Integer number of trees in the Isolation Forest |
param |
or |
stat.sim |
Summary statistics of the simulations (model output) |
stat.obs |
Summary statistics of the observation point |
talkative |
Logical parameter to print or do not print messages |
check_pos_def |
Logical parameter to check the Gram matrix is positive definite or do not check |
n_bullets |
Number of generating points between two |
n_best |
Number of the best points to construct the next web net |
halfwidth |
Parameter for the algorithm of deleting of generated points |
epsilon |
Criterion to stop meta-sampling |
rate |
Rate to renew points in the web net of generated points |
max_iteration |
Maximum of iterations during meta-sampling |
save_web |
Logical to save all the generated points (web net) |
use.iKernelABC |
The iKernelABC object to use for meta-sampling. By default it is NULL and is generated. |
new.param |
New parameter for the predictor input |
Matrix_Voronoi |
is a predefined matrix of information about Voronoi trees (rows - trees, columns - Voronoi points/areas IDs). By default it is NULL and is generated randomly. |
The function meta_sampling()
returns the list of the next objects:
input.parameters that is the list of all the input parameters for Isolation Kernel ABC method;
iteration that is iteration value when algorithm stopped;
network that is network points when algorithm stopped;
par.best that is data frame of one point that is the best from all the generated tracer points;
sim.best that is numeric value of the similarity of the best tracer point;
iKernelABC that is result of the function get.MaxWiK()
given on input parameters
;
spiderweb that is the list of all the networks during the meta-sampling.
The function MaxWiK.predictor()
returns the list of the next objects:
input.parameters that is the list of all the input parameters for Isolation Kernel ABC method;
iteration that is iteration value when algorithm stopped;
network that is network points when algorithm stopped;
prediction.best that is data frame of one point that is the best from all the generated tracer points;
sim.best that is numeric value of the similarity of the best tracer point;
iKernelABC that is result of the function get.MaxWiK()
given on input parameters
;
spiderweb that is the list of all the networks during the meta-sampling.
The function get.MaxWiK()
returns the list of :
kernel_mean_embedding is a maxima weighted kernel mean embedding (mapping) related to the observation point;
parameters_Matrix_Voronoi is a matrix of information about Voronoi trees (rows - trees, columns - Voronoi points/areas IDs) for parameters data set;
parameters_Matrix_iKernel is a matrix of of all points of PARAMETERS in a Hilbert space (rows - points, columns - isolation trees);
Hilbert_weights is a weights in Hilbert space to get maxima weighted kernel mean embedding for parameters_Matrix_iKernel;
Matrix_iKernel is a matrix of all points of simulations in a Hilbert space (rows - points, columns - isolation trees);
iFeature_point is a feature embedding mapping for the OBSERVATION point;
similarity is a vector of similarities between the simulation points and observation point;
Matrix_Voronoi is a matrix of information about Voronoi trees (rows - trees, columns - Voronoi points/areas IDs);
t is a number of trees in the Isolation Forest;
psi is a number of areas/points in the Voronoi diagrams
meta_sampling()
: The function to get the best value of parameter corresponding to
Maxima Weighted Isolation Kernel mapping which is related to an observation point
MaxWiK.predictor()
: The function to get the prediction of output based on a new parameter and MaxWiK
MaxWiK::MaxWiK_templates(dir = tempdir()) # See the template 'MaxWiK.ABC.R' and
# vignettes for usage.
MaxWiK::MaxWiK_templates(dir = tempdir()) # See the template 'MaxWiK.Predictor.R'
# and vignettes for usage.
MaxWiK::MaxWiK_templates(dir = tempdir()) # See the template 'MaxWiK.ABC.R' and
# vignettes for usage.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.