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