prune: Reduce the size of Fleming-Viot Dependent Dirichlet Processes

View source: R/prune.R

pruneR Documentation

Reduce the size of Fleming-Viot Dependent Dirichlet Processes

Description

Reduce the size of Fleming-Viot Dependent Dirichlet Processes

Usage

prune(fvddp, eps)

Arguments

fvddp

An object of class fvddp, generated via initialize().

eps

The value behold which the weights are removed, with their components of the mixture. eps has to be in the interval (0,1).

Value

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.

References

\insertRef

AscolaniLijoiRuggiero2023FVDDPpkg

Examples

#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)


FVDDPpkg documentation built on Sept. 11, 2024, 8 p.m.