MaP {fmx} | R Documentation |
Maximum a Posteriori clustering
Description
..
Usage
MaP(x, dist, ...)
Arguments
x |
|
dist |
an fmx object |
... |
.. |
Value
Function MaP returns an integer vector.
Examples
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')
[Package fmx version 0.1.2 Index]