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
AdaptGauss(Data, Means = NaN, SDs = NaN, Weights = NaN, ParetoRadius = NaN, LB = NaN, HB = NaN,
ListOfAdaptGauss, fast = T)
Data for empirical PDF. Has to be an Array of values. NaNs and NULLs will be deleted
Optional: Means of gaussians of GMM.
Optional: StandardDevations of gaussians of GMM. (Has to be the same length as Means)
Optional: Weights of gaussians of GMM. (Has to be the same length as Means)
Optional: Pareto Radius of Pareto Desity Estimation (PDE).
Optional: Low boundary of estimation. All values below LB will be deleted. Default: min(Data)
Optional: High boundary of estimation. All values above HB will be deleted. Default: max(Data)
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
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
List with
Means of Gaussian's.
Standard SDs of Gaussian's.
Weights of Gaussian's.
Pareto Radius: Either ParetoRadiusIn, the pareto radius enerated by PretoDensityEstimation(if no Pareto Radius in Input).
Root 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]
vector[1:L-1], Bayes decision boundaries
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.
Ultsch, A., Thrun, M.C., Hansen-Goos, O., Loetsch, J.: Identification of Molecular Fingerprints in Human Heat Pain Thresholds by Use of an Interactive Mixture Model R Toolbox(AdaptGauss), International Journal of Molecular Sciences, doi:10.3390/ijms161025897, 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.
# NOT RUN {
data1=c(rnorm(1000))
# }
# NOT RUN {
Vals1=AdaptGauss(data1)
# }
# NOT RUN {
data2=c(rnorm(1000),rnorm(2000)+2,rnorm(1000)*2-1)
# }
# NOT RUN {
Vals2=AdaptGauss(data2,c(-1,0,2),c(2,1,1),c(0.25,0.25,0.5),0.3,-6,6)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab