有没有办法使用 python 从矩阵正态分布 ( https://en.wikipedia.org/wiki/Matrix_normal_distribution#Drawing_values_from_the_distribution ) 中随机抽取样本? Numpy 具有从一维正态分布和多元正态分布中绘制的功能,但我在矩阵正态分布上找不到任何东西。谢谢。
请您参考如下方法:
从您链接的维基百科页面:
The matrix normal is related to the multivariate normal distribution in the following way:
if and only if
翻译成numpy,应该是
numpy.random.multivariate_normal(M.ravel(), np.kron(V, U)).reshape(M.shape)

