GMMplot_ggplot2 {AdaptGauss} | R Documentation |
PlotMixtures and PlotMixturesAndBoundaries for ggplot2
GMMplot_ggplot2(Data, Means, SDs, Weights,
BayesBoundaries, SingleGausses = TRUE, Hist = FALSE)
Data |
vector (1:N) of data points |
Means |
vector[1:L] of Means of Gaussians (of GMM),L == Number of Gaussians |
SDs |
vector of standard deviations, estimated Gaussian Kernels, has to be the same length as Means |
Weights |
vector of relative number of points in Gaussians (prior probabilities), has to be the same length as Means |
BayesBoundaries |
Optional, x values for baye boundaries, if missing 'BayesDecisionBoundaries' is called |
SingleGausses |
Optional, SingleGausses=T than components of the mixture in blue will be shown. |
Hist |
Optional, geom_histogram overlayed |
ggplot2 object
MT standardized code for CRAN and added dec boundaries and doku
Joern Loetsch, Michael Thrun (ctb)
PlotMixturesAndBoundaries
, PlotMixtures
, BayesDecisionBoundaries
data=c(rnorm(1000),rnorm(2000)+2,rnorm(1000)*2-1)
GMMplot_ggplot2(data,c(-1,0,2),c(2,1,1),c(0.25,0.25,0.5),SingleGausses=TRUE)