当前位置: 首页 > 文档资料 > Edward 中文文档 >

ed.ppc_density_plot

优质
小牛编辑
130浏览
2023-12-01

Aliases:

  • ed.criticisms.ppc_density_plot
  • ed.ppc_density_plot
ppc_density_plot(
    y,
    y_rep
)

Defined in edward/criticisms/ppc_plots.py.

Create 1D kernel density plot comparing data to samples from posterior.

Args:

  • y: np.ndarray. A 1-D NumPy array.
  • y_rep: np.ndarray. A 2-D NumPy array where rows represent different samples from posterior.

Returns:

matplotlib axes

Examples

import matplotlib.pyplot as plt
y = np.random.randn(20)
y_rep = np.random.randn(20, 20)
ed.ppc_density_plot(y, y_rep)
plt.show()