print_mbcfit: Display Information for Mixture Model Objects

print.mbcfitR Documentation

Display Information for Mixture Model Objects

Description

This function provides a print method for objects of class mbcfit, returned in output by the gmix function.

Usage

## S3 method for class 'mbcfit'
print(x, ...)

Arguments

x

An object of class mbcfit, typically a result of the gmix function.

...

Further arguments passed to or from other methods.

Details

The print.mbcfit function gives a summary of a model-based clustering fit, estimated using the gmix function.

The function handles different code values from the object's info field, each representing a specific status or error condition:

-2

'Lapack DSYEV failed'. This error occurs whenever any of the cluster-covariance matrices becomes singular during estimation, using the EM algorithm.

-1

'Memory allocation error'. This error occurs when there is insufficient available memory to allocate the quantities required to execute the EM algorithm.

1

Success.

2

'gmix' did not converge (iterations reached the maximum limit).

3

EM algorithm failed; no better than the initial solution. This error occurs whenever the EM algorithm failed for other reasons (e.g., degenerate posterior-weights could not be prevented), and it was not possible to find a solution.

The printed output also lists available components of the mbcfit object and summarizes the number of clusters found and their size, whenever this information is available.

Value

No return value, called for side effects

See Also

gmix

Examples

set.seed(123)

# Estimate a simple a 3-clusters Gaussian mixture model, using iris data as example
res <- gmix(iris[,-5], K = 3, erc = 10)

# Print the 'gmix' output
print(res)

qcluster documentation built on April 3, 2025, 6:16 p.m.