Extract entropy from a SurveyMixr object or compute from posterior probabilities.
Usage
entropy(object, weights = NULL)
# S3 method for class 'SurveyMixr'
entropy(object, weights = NULL)
# S3 method for class 'matrix'
entropy(object, weights = NULL)
# Default S3 method
entropy(object, weights = NULL)Value
Numeric entropy value between 0 and 1, where values closer to 1 indicate better class separation
Details
Entropy measures the certainty of classification in mixture models. It is calculated as: $$E = 1 - \frac{\sum_i \sum_k p_{ik} \log(p_{ik})}{N \log(K)}$$
where \(p_{ik}\) is the posterior probability of individual i belonging to class k, N is the sample size, and K is the number of classes.
Values range from 0 (complete uncertainty, uniform classification) to 1 (perfect classification). Values above 0.80 generally indicate good class separation.