prune | R Documentation |
Reduce the size of Fleming-Viot Dependent Dirichlet Processes
prune(fvddp, eps)
fvddp |
An object of class |
eps |
The value behold which the weights are removed, with their components
of the mixture. |
An fvddp
list of smaller size of the input. Precisely, the components
whose weight goes below the treshold eps
will be removed: the vector w
and
the matrix M
will have a lower amount of rows; if the latter will include all-zero
columns, they will be removed.
AscolaniLijoiRuggiero2023FVDDPpkg
#create a large process
FVDDP = initialize(3, function(x) rexp(x, 4),
function(x) dexp(x, 4), FALSE)
FVDDP = update(FVDDP, c(rep(rexp(1, 3), 7), rep(rexp(1, 5), 5), rexp(1, 7), 3))
FVDDP = propagate(FVDDP, 1)
prune(fvddp = FVDDP, eps = 1e-4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.