Learn R Programming

AdaptGauss (version 1.2.0)

AdaptGauss: Adapt Gaussian Mixture Model (GMM)

Description

Adapt interactively a Gaussians Mixture Model GMM to the empirical PDF of the data (generated by ParetoDensityEstimation) such that N(Means,SDs)*Weights is a model for Data

Usage

AdaptGauss(Data,Means,SDs,Weights,ParetoRadius,LB,HB,ListOfAdaptGauss,fast)

Arguments

Data
Data for empirical PDF. Has to be an Array of values. NaNs and NULLs will be deleted
Means
Optional: Means of gaussians of GMM.
SDs
Optional: StandardDevations of gaussians of GMM. (Has to be the same length as Means)
Weights
Optional: Weights of gaussians of GMM. (Has to be the same length as Means)
ParetoRadius
Optional: Pareto Radius of Pareto Desity Estimation (PDE).
LB
Optional: Low boundary of estimation. All values below LB will be deleted. Default: min(Data)
HB
Optional: High boundary of estimation. All values above HB will be deleted. Default: max(Data)
ListOfAdaptGauss
Optional: If editing of an existing Model is the goal, enables to give the Output of AdaptGaus as the Input of AdaptGauss() instead of setting Means, SDs and Weights separately
fast
Default=TRUE; FALSE: Using mclust's EM see function densityMclust of that package, TRUE: Naive but faster EM implementation, which may be numerical unstable, because log(gauss) is not used

Value

  • List with
  • MeansMeans of Gaussian's.
  • SDsStandard SDs of Gaussian's.
  • WeightsWeights of Gaussian's.
  • ParetoRadiusPareto Radius: Either ParetoRadiusIn, the pareto radius enerated by PretoDensityEstimation(if no Pareto Radius in Input).
  • RMSRoot Mean Square of Deviation between Gaussian Mixture Model GMM to the empirical PDF. Normalized by RMS of one Gaussian with mean=meanrobust(data) and sdev=stdrobust(data). Further Details in [Ultsch et al 2015]
  • BayesBoundariesvector[1:L-1], Bayes decision boundaries

Details

Data: maximum length is 10000. If larger, Data will be randomly reduced to 10000 Elements. MeansIn/DeviationsIn/WeightsIN: If empty, either one or three Gaussian's are generated by kmeans algorithm. Pareto Radius: If empty: will be generated by ParetoDensityEstimation RMS: Root Mean Square error is normalized by RMS of Gaussian's with Mean=mean(data) and SD=sd(data), see [Ultsch et.al., 2015] for further details.

References

Alfred Ultsch, Michael C. Thrun, Onno Hansen-Goos, Joern Loetsch Identification of molecular fingerprints in heat pain thresholds by use of an interactive mixture model toolbox (AdaptGauss), IJMS 2015. Thrun M.C.,Ultsch, A., Models of Income Distributions for Knowledge Discovery, European Conference on Data Analysis, DOI 10.13140/RG.2.1.4463.0244, Colchester 2015.

Examples

Run this code
data1=c(rnorm(1000))
  Vals1=AdaptGauss(data1)
  
  data2=c(rnorm(1000),rnorm(2000)+2,rnorm(1000)*2-1)
  Vals2=AdaptGauss(data2,c(-1,0,2),c(2,1,1),c(0.25,0.25,0.5),0.3,-6,6)

Run the code above in your browser using DataLab