test_batch_base.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:megamix 作者: 14thibea 项目源码 文件源码
def test_compute_precisions_chol_full():
    n_components, n_features = 5,2

    cov = generate_covariance_matrices_full(n_components,n_features)
    expected_precisions_chol = np.empty((n_components,n_features,n_features))
    for i in range(n_components):
        cov_chol = linalg.cholesky(cov[i],lower=True)
        expected_precisions_chol[i] = np.linalg.inv(cov_chol).T

    predected_precisions_chol = _compute_precisions_chol(cov,'full')

    assert_almost_equal(expected_precisions_chol,predected_precisions_chol)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号