print.mbcfit | R Documentation |
This function provides a print method for objects of class mbcfit
, returned in output by the gmix
function.
## S3 method for class 'mbcfit'
print(x, ...)
x |
An object of class |
... |
Further arguments passed to or from other methods. |
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.
No return value, called for side effects
gmix
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.