| Title: | Multivariate Pseudo-Voigt Mixture Models |
|---|---|
| Description: | Fits multivariate pseudo-Voigt mixture models for model-based clustering and outlier detection. The model combines multivariate Gaussian and Cauchy distributions within each cluster to accommodate heavy-tailed observations and decompose the data into a high-density region and a low-density remainder, with outliers more likely to arise from the latter. |
| Authors: | Babak Fathollahi Dehkordi [aut, cre], Jeffery Andrews [aut, ths] |
| Maintainer: | Babak Fathollahi Dehkordi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-09 09:17:50 UTC |
| Source: | https://github.com/cran/PseudoVoigtMixt |
Fit Multivariate Pseudo-Voigt Mixture Models Estimates MPVM models over a range of numbers of components and selects the best-fitting model according to the Bayesian information criterion (BIC).
MPVmixt( x, G_range, max_iter = 100, init_method = c("modified_tkmeans", "manual"), tol = 1e-08, alpha_trim = 0.3, nstart = 1000, verbose = FALSE, seed = NULL, shared_scale = TRUE, Z_init = NULL, V_init = NULL )MPVmixt( x, G_range, max_iter = 100, init_method = c("modified_tkmeans", "manual"), tol = 1e-08, alpha_trim = 0.3, nstart = 1000, verbose = FALSE, seed = NULL, shared_scale = TRUE, Z_init = NULL, V_init = NULL )
x |
Numeric matrix or data frame containing the observations. Rows correspond to observations and columns to variables. |
G_range |
Positive integer or vector of positive integers specifying the number of mixture components to fit. |
max_iter |
Maximum number of EM iterations. Default is 100. |
init_method |
Initialization method. Either '"modified_tkmeans"' or '"manual"'. |
tol |
Positive convergence tolerance for the log-likelihood. |
alpha_trim |
Trimming proportion used by the modified trimmed k-means initialization. |
nstart |
Number of random starts used by the modified trimmed k-means initialization. |
verbose |
Logical; if 'TRUE', iteration information is printed. |
seed |
Optional random seed for reproducibility. |
shared_scale |
Logical; if 'TRUE', the Gaussian and Cauchy sub-components share the same scale matrix within each cluster. |
Z_init |
Optional initial cluster-membership matrix used when 'init_method = "manual"'. |
V_init |
Optional initial Gaussian/Cauchy sub-component-membership matrix used when 'init_method = "manual"'. |
A list containing:
Results for each value in 'G_range'.
The model corresponding to the minimum BIC, including clustering and outlier-detection results.
Numeric vector of BIC values corresponding to 'G_range'.
#' @examples sim <- rmpvm( n = 100, pi = c(0.5, 0.5), alpha = c(0.8, 0.8), mu = list( c(0, 0), c(4, 4) ), Sigma = list( diag(2), diag(2) ), Gamma = list( diag(2), diag(2) ), seed = 123 )
fit <- MPVmixt( x = sim$data, G_range = 2, max_iter = 20, nstart = 20, seed = 123 )
fit$best$G
Generate Data from a Multivariate Pseudo-Voigt Mixture Model
rmpvm(n, pi, alpha, mu, Sigma, Gamma, seed = NULL)rmpvm(n, pi, alpha, mu, Sigma, Gamma, seed = NULL)
n |
Number of observations to generate. |
pi |
Numeric vector of mixing proportions. |
alpha |
Numeric vector of Gaussian subcomponent proportions. |
mu |
List of component location vectors. |
Sigma |
List of Gaussian covariance matrices. |
Gamma |
List of Cauchy scale matrices. |
seed |
Optional random seed for reproducibility. |
A list containing the generated data matrix, latent cluster labels, latent Gaussian/Cauchy indicators, and corresponding factor labels.
#' @examples sim <- rmpvm( n = 100, pi = c(0.5, 0.5), alpha = c(0.8, 0.8), mu = list( c(0, 0), c(4, 4) ), Sigma = list( diag(2), diag(2) ), Gamma = list( diag(2), diag(2) ), seed = 123 )
head(sim$data)