(checkpoint, bd, n_class, n_groups)
| 77 | ax[1].set_title('After optimization', fontsize=font_big, fontweight="bold", y=1.02) |
| 78 | |
| 79 | def plot_hard_optimzed_adj(checkpoint, bd, n_class, n_groups): |
| 80 | data = checkpoint["data"].to(device) |
| 81 | adj_size = data.x.size(0) |
| 82 | row = data.edge_index[0] |
| 83 | col = data.edge_index[1] |
| 84 | |
| 85 | bd1 = bd |
| 86 | n_class = n_class |
| 87 | n_groups = n_groups |
| 88 | bd1, bd2, bd3 = my_get_bd(n_groups, n_class, bd1) |
| 89 | |
| 90 | # plot_bd(ax[0], bd1, adj_size, color='g') |
| 91 | plot_bd(ax[2], bd2, adj_size, color='g') |
| 92 | plot_bd(ax[2], bd3, adj_size, color='r') |
| 93 | ax[2].scatter(row, col, s=10, alpha=0.5, c='b') |
| 94 | ax[2].set_ylim([0, adj_size]) |
| 95 | ax[2].set_xlim([adj_size, 0]) |
| 96 | ax[2].set_xticks([]) |
| 97 | ax[2].set_yticks([]) |
| 98 | ax[2].set_title('After optimization', fontsize=font_big, fontweight="bold", y=1.02) |
| 99 | |
| 100 | |
| 101 | def get_parameters_2_3_10(model, dataset): |
no test coverage detected