|
63 | 63 | import matplotlib.pyplot as plt |
64 | 64 |
|
65 | 65 | voxel_1 = np.argmax(ev) |
| 66 | +time = np.arange(Y_test.shape[1]) * 2 # one time point every 2 seconds |
66 | 67 | plt.figure(figsize=(10, 3)) |
67 | | -plt.plot(Y_test[:, :, voxel_1].T, color='C0', alpha=0.5) |
68 | | -plt.plot(Y_test[:, :, voxel_1].mean(0), color='C1', label='average') |
69 | | -plt.xlabel("Time points") |
| 68 | +plt.plot(time, Y_test[:, :, voxel_1].T, color='C0', alpha=0.5) |
| 69 | +plt.plot(time, Y_test[:, :, voxel_1].mean(0), color='C1', label='average') |
| 70 | +plt.xlabel("Time (sec)") |
70 | 71 | plt.title("Voxel with large explainable variance (%.2f)" % ev[voxel_1]) |
71 | 72 | plt.yticks([]) |
72 | 73 | plt.legend() |
|
77 | 78 | # ... and of a voxel with low explainable variance. |
78 | 79 | voxel_2 = np.argmin(ev) |
79 | 80 | plt.figure(figsize=(10, 3)) |
80 | | -plt.plot(Y_test[:, :, voxel_2].T, color='C0', alpha=0.5) |
81 | | -plt.plot(Y_test[:, :, voxel_2].mean(0), color='C1', label='average') |
82 | | -plt.xlabel("Time points") |
| 81 | +plt.plot(time, Y_test[:, :, voxel_2].T, color='C0', alpha=0.5) |
| 82 | +plt.plot(time, Y_test[:, :, voxel_2].mean(0), color='C1', label='average') |
| 83 | +plt.xlabel("Time (sec)") |
83 | 84 | plt.title("Voxel with low explainable variance (%.2f)" % ev[voxel_2]) |
84 | 85 | plt.yticks([]) |
85 | 86 | plt.legend() |
|
0 commit comments