Last active
December 30, 2015 20:58
-
-
Save akanik/a3ac3fea2893ef0ddeed to your computer and use it in GitHub Desktop.
coral_asset_discussion_score
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def asset_discussion_score(threads, k=1, theta=2): | |
X = np.array([max_thread_width(t) * max_thread_depth(t) for t in threads]) | |
n = len(X) | |
k = np.sum(X) + k | |
t = theta/(theta*n + 1) | |
return {'discussion_score': gamma_poission_model(X, n, k, theta, 0.05)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment