def plot_eig(model, maps, t, condition = 0, color = [0, 0, 1]):
import scipy.linalg as la
w = get_weights(model)
wrec = w[1]
bin_maps = maps.astype('int')
bin_t = bin_maps[condition, t, :].reshape(np.shape(bin_maps)[2], 1)
bin_mask = bin_t.dot(bin_t.T)
eva = la.eig(wrec * bin_mask)
plt.scatter(eva[0].real, eva[0].imag, 12, color)
plt.xlabel('real')
plt.ylabel('imaginary')
# Dave's visualization function
评论列表
文章目录