def violin_plots_confidence(n_generations, n_agents, bottleneck, length_inputs): """ """ # FIX: it works for any number of agents and generations # but doesn't show the difference between generations and agents with colours data = iteration.iterate(n_generations, n_agents, bottleneck, length_inputs) plt.violinplot(data.as_matrix()) plt.title("Bottleneck: {}".format(bottleneck)) plt.xlabel("Generations") plt.ylabel("Confidence for all inputs") plt.show()
cpt_idle = 0 i_snap = 0 d12 = 0 duration = 0 coact_pos = np.zeros((p, p)) coact_neg = coact_pos.copy() r_i_k, r_i_S_A, r_i_S_B, sig_i_k, m_mu, dt_r_i_k_act, dt_r_i_S_A, \ dt_r_i_S_B, theta_i_k, dt_theta_i_k, h_i_k = initialisation.network( J_i_j_k_l, delta__ksi_i_mu__k, g_A, w, cue_mask) for iT in tqdm(range(nT)): iteration.iterate(J_i_j_k_l, delta__ksi_i_mu__k, tS[iT], analyseTime, analyseDivergence, sig_i_k, r_i_k, r_i_S_A, r_i_S_B, theta_i_k, h_i_k, m_mu, dt_r_i_S_A, dt_r_i_S_B, dt_r_i_k_act, dt_theta_i_k, cue, t_0, g_A, w, cue_mask) # Saving data for plots # if tS[iT] > t_0+tau_1: # print((np.outer(m_mu, m_mu)).shape) # coact = np.outer(m_mu, m_mu) # tmp_ind = coact > coact_pos # coact_pos[tmp_ind] = coact[tmp_ind] # tmp_ind = coact < coact_neg # coact_neg[tmp_ind] = coact[tmp_ind] duration = tS[iT]-t_0 retrieved_pattern = np.argmax(m_mu)