idealo / image-quality-assessment

Convolutional Neural Networks to predict the aesthetic and technical quality of images.
https://idealo.github.io/image-quality-assessment/
Apache License 2.0
2.09k stars 447 forks source link

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

Open lbundalian opened 1 year ago

lbundalian commented 1 year ago

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