def logProbForMultinomials(alphas, ss, delta):
    alpha_sum = np.sum(alphas)
    retVal = mathExtra.gammaln(alpha_sum)
    retVal -= np.sum(mathExtra.gammaln(alphas))
    retVal += np.sum(np.multiply(alphas, ss))
    retVal -= (delta * np.square(alphas).sum())
    return retVal
def logProbForMultinomials(alphas, ss, delta):
    alpha_sum = np.sum(alphas)
    retVal = mathExtra.gammaln(alpha_sum)
    retVal -= np.sum(mathExtra.gammaln(alphas))
    retVal += np.sum(np.multiply(alphas, ss))
    retVal -= (delta * np.square(alphas).sum())
    return retVal