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

Look into n-gram entropy #6

Open
evamaxfield opened this issue Apr 30, 2022 · 0 comments
Open

Look into n-gram entropy #6

evamaxfield opened this issue Apr 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@evamaxfield
Copy link
Member

From Bill:

(word1, frequncy), (word2, frequency), ...
then trying to measure how far that distribution is from uniform
one simple nice way is entropy
P(word1)*log(P(word1)) + P(word2)*log(P(word2)) + ...
where P(word1) is just frequency of word1 / total words

It's nice because it measures how "unpredictable" the signal is. If most words are zero, and only a few words are common, then it's predictable. Or, if all words are exactly the same, then it's predictable. But if it's crazy town, then it's not predictable.

This seems like a decent resource: http://normal-extensions.com/2013/08/04/entropy-for-n-grams/

@evamaxfield evamaxfield added the enhancement New feature or request label Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant