MaP function

Maximum a Posteriori clustering

Maximum a Posteriori clustering

..

MaP(x, dist, ...)

Arguments

  • x: numeric vector
  • dist: an fmx object
  • ...: ..

Returns

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')
  • Maintainer: Tingting Zhan
  • License: GPL-2
  • Last published: 2025-03-15

Useful links