def __calc_phi(adj): phi, eta = phi_fitter.fit_phis(adj, superclusters, supervars, method=phi_method, iterations=phi_iterations, parallel=0) return phi
def use_existing_structures(adjms, supervars, superclusters, phi_method, phi_iterations, parallel=0): V, N, omega_v = calc_binom_params(supervars) K = len(supervars) phis = [] llhs = [] for adjm in adjms: assert adjm.shape == (K+1, K+1) phi, eta = phi_fitter.fit_phis(adjm, superclusters, supervars, method=phi_method, iterations=phi_iterations, parallel=parallel) llh = _calc_llh_phi(phi, V, N, omega_v) phis.append(phi) llhs.append(llh) return (np.array(adjms), np.array(phis), np.array(llhs))