def observed_perplexity(self):
"""Compute perplexity = exp(entropy) of observed variables.
Perplexity is an information theoretic measure of the number of
clusters or observed classes. Perplexity is a real number in the range
[1, dim[v]], where dim[v] is the number of categories in an observed
categorical variable or 2 for an ordinal variable.
Returns:
A [V]-shaped numpy array of perplexity.
"""
return self._server.observed_perplexity(self._counts)
评论列表
文章目录