(m, color, ax)
| 130 | |
| 131 | # %% |
| 132 | def plot(m, color, ax): |
| 133 | xx = np.linspace(-1, 11, 100)[:, None] |
| 134 | mu, var = m.predict_y(xx) |
| 135 | ax.plot(xx, mu, color, lw=2) |
| 136 | ax.fill_between( |
| 137 | xx[:, 0], |
| 138 | mu[:, 0] - 2 * np.sqrt(var[:, 0]), |
| 139 | mu[:, 0] + 2 * np.sqrt(var[:, 0]), |
| 140 | color=color, |
| 141 | alpha=0.2, |
| 142 | ) |
| 143 | ax.plot(X, Y, "kx", mew=2) |
| 144 | ax.set_xlim(-1, 11) |
| 145 | |
| 146 | |
| 147 | f, ax = plt.subplots(3, 2, sharex=True, sharey=True, figsize=(12, 9)) |
no test coverage detected
searching dependent graphs…