GMMplot_ggplot2 {AdaptGauss}R Documentation

Plots the Gaussian Mixture Model (GMM) withing ggplot2

Description

PlotMixtures and PlotMixturesAndBoundaries for ggplot2

Usage

GMMplot_ggplot2(Data, Means, SDs, Weights,

BayesBoundaries, SingleGausses = TRUE, Hist = FALSE)

Arguments

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

Value

ggplot2 object

Note

MT standardized code for CRAN and added dec boundaries and doku

Author(s)

Joern Loetsch, Michael Thrun (ctb)

See Also

PlotMixturesAndBoundaries, PlotMixtures, BayesDecisionBoundaries

Examples

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)


[Package AdaptGauss version 1.6 Index]