Description Usage Arguments Value Examples
Sample Mean for Gaussian Mixture Data
1 2 |
x |
An object of class |
native |
Boolean specyfing whether the resulting mean should be mapped
back as a density (default: |
The sample mean of the input Gaussian mixture data in density space
(if native==TRUE
) or in clr-space otherwise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | N <- 100
M <- 4
w <- matrix(runif(N * M), N, M)
w <- w / rowSums(w)
s <- tidyr::crossing(
observation = paste0("O", 1:N),
component = paste0("C", 1:M)
) %>%
dplyr::mutate(mixing = as.numeric(t(w)))
d <- tibble::tibble(
component = paste0("C", 1:M),
mean = numeric(M),
precision = 1:M
)
x <- gmd(s, d)
mean(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.