MaP | R Documentation |
..
MaP(x, dist, ...)
x |
numeric vector |
dist |
an fmx object |
... |
.. |
Function MaP()
returns an integer vector.
x = rnorm(1e2L, sd = 2)
m = fmx('norm', mean = c(-1.5, 1.5), w = c(1, 2))
library(ggplot2)
ggplot() + geom_function(fun = dfmx, args = list(dist = m)) +
geom_point(mapping = aes(x = x, y = .05, color = factor(MaP(x, dist = m)))) +
labs(color = 'Maximum a Posteriori\nClustering')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.