rvm.py 文件源码

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

项目:prml 作者: Yevgnen 项目源码 文件源码
def predict(self, X, T, X_new):
        """Predict ``X_new`` with given traning data ``(X, T)``."""
        n_tests = X_new.shape[0]
        phi = sp.r_[sp.ones(n_tests).reshape(1, -1), self._compute_design_matrix(X_new, X)]  # Add x0
        phi = phi[self.rv_indices, :]

        predict_mean = sp.dot(self.mean, phi)
        predict_cov = 1 / self.beta + sp.dot(phi.T, sp.dot(self.cov, phi)).diagonal()

        return predict_mean, predict_cov
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号