Given a tidied dataframe of topic-doc or word-topic distributions and a target entropy, find the mean exponent needed to adjust the temperature of each distribution to approximately match the target entropy.
Examples
# \donttest{
set.seed(42)
theta = rdirichlet(50, 1, k = 3)
phi = rdirichlet(3, 0.1, k = 20)
corpus = draw_corpus(rep(50L, 50), theta, phi)
model = tmfast(corpus, n = 3)
beta = tidy(model, matrix = 'beta', k = 3)
target_power(beta, topic, beta, target_entropy = 2)
#> [1] 0.5044985
# }