Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant