(self, exps, spec)
| 96 | plt.close('all') |
| 97 | |
| 98 | def plot_nullspace(self, exps, spec): |
| 99 | |
| 100 | logs = [exps[e].runs[spec.sequence].log for e in spec.experiments] |
| 101 | names = [exps[e].display_name for e in spec.experiments] |
| 102 | |
| 103 | num_plots = len(names) |
| 104 | |
| 105 | if num_plots == 4: |
| 106 | if True: |
| 107 | if spec.figsize is None: |
| 108 | spec.figsize = [10, 2.5] |
| 109 | fig, axs = plt.subplots(1, 4, figsize=spec.figsize, sharey=True) |
| 110 | else: |
| 111 | if spec.figsize is None: |
| 112 | spec.figsize = [10, 4.7] |
| 113 | fig, axs = plt.subplots(2, 2, figsize=spec.figsize, sharey=True) |
| 114 | axs = axs.flatten() |
| 115 | else: |
| 116 | if spec.figsize is None: |
| 117 | spec.figsize = [6, 2 * num_plots] |
| 118 | fig, axs = plt.subplots(num_plots, 1, figsize=spec.figsize, sharey=True) |
| 119 | |
| 120 | if num_plots == 1: |
| 121 | axs = [axs] |
| 122 | |
| 123 | for i, (log, name) in enumerate(zip(logs, names)): |
| 124 | |
| 125 | if log is None: |
| 126 | continue |
| 127 | |
| 128 | ax = axs[i] |
| 129 | |
| 130 | ns = log.sums.marg_ns[1:] # skip first prior, which just is all 0 |
| 131 | ns = np.abs(ns) # cost change may be negative, we are only interested in the norm |
| 132 | ns = np.maximum(ns, 1e-20) # clamp at very small value |
| 133 | |
| 134 | markerfacecolor = "white" |
| 135 | |
| 136 | markevery = 1000 |
| 137 | if spec.sequence == "kitti10": |
| 138 | markevery = 100 |
| 139 | |
| 140 | ax.semilogy( |
| 141 | ns[:, 0], |
| 142 | ":", |
| 143 | # label="x", |
| 144 | color="tab:blue") |
| 145 | ax.semilogy( |
| 146 | ns[:, 1], |
| 147 | ":", |
| 148 | # label="y", |
| 149 | color="tab:blue") |
| 150 | ax.semilogy( |
| 151 | ns[:, 2], |
| 152 | ":", |
| 153 | # label="z", |
| 154 | label="x, y, z", |
| 155 | color="tab:blue", |
nothing calls this directly
no outgoing calls
no test coverage detected