前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >统计学习 | 矩阵正态分布 (matrix normal distribution)

统计学习 | 矩阵正态分布 (matrix normal distribution)

作者头像
马上科普尚尚
发布2020-06-03 14:16:26
2.5K0
发布2020-06-03 14:16:26
举报

在机器学习和统计学习中,正态分布的身影无处不在,最为常见的是标准正态分布和多元正态分布 (multivariate normal distribution),两者分别作用于标量 (scalar) 和向量 (vector)。实际上,也存在一种正态分布的形式,它作用于矩阵,并广泛地应用于贝叶斯向量自回归模型 (Bayesian vector autoregression) 中。本文接下来将从大家所熟知的正态分布出发,先介绍矩阵正态分布,然后讨论矩阵正态分布在贝叶斯方法中的应用。

从标准正态分布到矩阵正态分布

代码语言:javascript
复制
def mnrnd(M, U, V):
    """
    Generate matrix normal distributed random matrix.
    M is a m-by-n matrix, U is a m-by-m matrix, and V is a n-by-n matrix.
    """
    import numpy as np

    X0 = np.random.rand(M.shape)
    P = np.linalg.cholesky(U)
    Q = np.linalg.cholesky(V)
    return M + np.matmul(np.matmul(P, X0), Q.T)

参考

1. https://en.wikipedia.org/wiki/Matrix_normal_distribution

2. http://faculty.wcas.northwestern.edu/~lchrist/course/Korea_2016/bayesian_VAR_handout.pdf

3. https://www.oru.se/globalassets/oru-sv/institutioner/hh/workingpapers/workingpapers2012/wp-12-2012.pdf

4. https://www.michaelchughes.com/blog/probability-basics/autoregressive-time-series-models/

5. https://www.ucm.es/data/cont/media/www/pag-105960/BVARs.pdf

作者:知乎-Xinyu Chen

地址:https://www.zhihu.com/people/its31

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2020-05-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 人工智能前沿讲习 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. https://en.wikipedia.org/wiki/Matrix_normal_distribution
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档