base_i.py 文件源码

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

项目:adversarial-variational-bayes 作者: gdikov 项目源码 文件源码
def estimation(self, y, ds):
        """ Estimate KGV.

        Parameters
        ----------
        y : (number of samples, dimension)-ndarray
             One row of y corresponds to one sample.
        ds : int vector
             Dimensions of the individual subspaces in y; ds[i] = i^th
             subspace dimension.

        Returns
        -------
        i : float
            Estimated value of KGV.

        References
        ----------
        Francis Bach, Michael I. Jordan. Kernel Independent Component
        Analysis. Journal of Machine Learning Research, 3: 1-48, 2002.

        Francis Bach, Michael I. Jordan. Learning graphical models with
        Mercer kernels. International Conference on Neural Information
        Processing Systems (NIPS), pages 1033-1040, 2002.

        Examples
        --------
        i = co.estimation(y,ds)

        """

        # verification:
        self.verification_compatible_subspace_dimensions(y, ds)

        num_of_samples = y.shape[0]
        tol = num_of_samples * self.eta

        r = compute_matrix_r_kcca_kgv(y, ds, self.kernel, tol, self.kappa)
        i = -log(det(r)) / 2

        return i
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号