Gaussian mixture modeling of one- and two-dimensional data, provided in original or binned form, with an option to estimate the number of model components. The method uses Gaussian Mixture Models (GMM) with initial parameters determined by a dynamic programming algorithm, leading to stable and reproducible model fitting. For more details see Zyla, J., Szumala, K., Polanski, A., Polanska, J., & Marczyk, M. (2026)

R package dpGMM for dynamic programming based Gaussian mixture modelling clustering for 1D and 2D data.
Package functionality:
You can install the package from GitHub with:
# install.packages("devtools")
devtools::install_github("ZAEDPolSl/dpGMM")
At first after isnatlation load library into R and load examplary data.
library(dpGMM)
data(example)
Next, let's load GMM control parameters for 1D and change maximum number of iteration to 1000 (just to speed up).
custom.settings <- GMM_1D_opts
custom.settings$max_iter <- 1000
To run GMM for 1D vector data the following code will work.
mix_test <- runGMM(example$Dist, opts = custom.settings)
[1] Polanski, Andrzej, et al." "Initializing the EM algorithm for univariate Gaussian, multi-component, heteroscedastic mixture models by dynamic programming partitions." International Journal of Computational Methods 15.03 (2018): 1850012.
[2] Zyla, J., Szymala, K., Polanski, A., Polanska, J., Marczyk,. M: "dpGMM: R package for dynamic programming-based Gaussian mixture modeling of 1D and 2D data" in preparation