I am trying to simulate a GP with a Matern covariance and I want to visualize the 2D matrix. The problem is that the functions plt.imshow()
and seaborn.heatmap()
are not doing what quilt.plot()
does. Any suggestions?
Edit: to show what I have tried
iid_data = np.random.randn(self.n_points, 1)
chol_decomp_lower = np.linalg.cholesky(covariance)
observed_data = chol_decomp_lower @ iid_data
x_coor = self.domain[:, 0].reshape(32, 32)
y_coor = self.domain[:, 1].reshape(32, 32)
colormap = observed_data.reshape(32, 32)
observed_data = np.zeros([32, 32, 3])
observed_data[:, :, 0] = x_coor
observed_data[:, :, 1] = y_coor
observed_data[:, :, 2] = iid_data.reshape(32, 32)
plt.imshow(iid_data.reshape(32, 32), cmap="hot")
plt.imshow(colormap, cmap="hot")
observed_data[:, :, 2] = colormap
plt.imshow(observed_data)
plt.pcolormesh(x_coor, y_coor, colormap)
sn.heatmap(iid_data.reshape(32, 32), cmap="YlGnBu")
sn.heatmap(colormap, cmap="YlGnBu")
source https://stackoverflow.com/questions/69744245/is-there-a-quilt-plot-equivalent-function-from-r-in-python
Comments
Post a Comment