Skip to content

Instantly share code, notes, and snippets.

@akanik
Last active December 30, 2015 20:58
Show Gist options
  • Save akanik/a3ac3fea2893ef0ddeed to your computer and use it in GitHub Desktop.
Save akanik/a3ac3fea2893ef0ddeed to your computer and use it in GitHub Desktop.
coral_asset_discussion_score
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