def _init_ws(n_items, comparisons, prior_inv, tau, nu):
prec = np.zeros((n_items, n_items))<EOL>xs = np.zeros(n_items)<EOL>for i, (a, b) in enumerate(comparisons):<EOL><INDENT>prec[(a, a, b, b), (a, b, a, b)] += tau[i] * MAT_ONE_FLAT <EOL>xs[a] += nu[i]<EOL>xs[b] -= nu[i]<EOL><DEDENT>cov = inv_posdef(prior_inv + prec)<EOL>mean = cov.dot(xs)<EOL>return mean, cov, xs , prec<EOL>
Initialize parameters in the weight space.