inference | R Documentation |
This function performs inference in a (non-temporal) Gaussian mixture Bayesian network. This task consists in estimating the state of the system given partial observations of it (the evidence). Inference is performed by likelihood weighting, which is a particle-based approximate method (Koller and Friedman, 2009).
inference( gmbn, evid, nodes = names(gmbn), n_part = 1000, max_part_sim = 1e+06, verbose = FALSE )
gmbn |
A (non-temporal) object of class |
evid |
A data frame containing the evidence. Its columns must explicitly
be named after nodes of |
nodes |
A character vector containing the inferred nodes (by default all
the nodes of |
n_part |
A positive integer corresponding to the number of particles generated for each observation. |
max_part_sim |
An integer greater than or equal to |
verbose |
A logical value indicating whether subsets of |
A data frame (tibble) with a structure similar to evid
containing the estimated values of the inferred nodes.
Koller, D. and Friedman, N. (2009). Probabilistic Graphical Models: Principles and Techniques. The MIT Press.
filtering
, prediction
,
smoothing
set.seed(0) data(gmbn_body, data_body) evid <- data_body evid$GENDER[sample.int(2148, 430)] <- NA evid$AGE[sample.int(2148, 430)] <- NA evid$HEIGHT[sample.int(2148, 430)] <- NA evid$WEIGHT[sample.int(2148, 430)] <- NA evid$FAT[sample.int(2148, 430)] <- NA evid$WAIST[sample.int(2148, 430)] <- NA evid$GLYCO[sample.int(2148, 430)] <- NA infer <- inference(gmbn_body, evid, verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.