particles {gmgm} | R Documentation |
Initialize particles to perform inference in a Gaussian mixture graphical model
Description
This function initializes particles to perform (approximate) inference in a Gaussian mixture graphical model. Particles consist in weighted sample sequences propagated forward in time by sampling the model and aggregated to obtain the inferred values (Koller and Friedman, 2009).
Usage
particles(seq = NULL, col_weight = "weight", n_part = 1000)
Arguments
seq |
A data frame containing the observation sequences for which
particles are initialized. If |
col_weight |
A character string corresponding to the column name of the resulting data frame that describes the particle weight. |
n_part |
A positive integer corresponding to the number of particles initialized for each observation sequence. |
Value
A data frame (tibble) containing the initial particles.
References
Koller, D. and Friedman, N. (2009). Probabilistic Graphical Models: Principles and Techniques. The MIT Press.
See Also
Examples
data(data_air)
part <- particles(data.frame(DATE = unique(data_air$DATE)))