def log_likelihood_top1(data, params):
loglik = <NUM_LIT:0><EOL>params = np.asarray(params)<EOL>for winner, losers in data:<EOL><INDENT>idx = np.append(winner, losers)<EOL>loglik -= logsumexp(params.take(idx) - params[winner])<EOL><DEDENT>return loglik<EOL>
Compute the log-likelihood of model parameters.