Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Max Entropy Result for value = 7 yields 5.5 in calc_mean_score #109

Open
lbundalian opened this issue Jul 19, 2023 · 0 comments
Open

Max Entropy Result for value = 7 yields 5.5 in calc_mean_score #109

lbundalian opened this issue Jul 19, 2023 · 0 comments

Comments

@lbundalian
Copy link

in the code:
def get_max_entropy_distribution(mean):
SAMPLESPACE = np.arange(10)
features = get_features()

model = MinDivergenceModel(features, samplespace=SAMPLESPACE, algorithm='CG')

# set the desired feature expectations and fit the model
X = np.array([[mean]])
model.fit(X)

return model.probdist()

the resulting entropy is an array consisting of 0.9999998 or something, when i tried to revert it using calc_mean_score, it yields 5.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant