radial.py 文件源码

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

项目:PyGeM 作者: mathLab 项目源码 文件源码
def _distance_matrix(self, X1, X2):
        """
        This private method returns the following matrix:
        :math:`\\boldsymbol{D_{ij}} = \\varphi(\\| \\boldsymbol{x_i} -
                \\boldsymbol{y_j} \\|)`

        :param numpy.ndarray X1: the vector x in the formula above.
        :param numpy.ndarray X2: the vector y in the formula above.

        :return: matrix: the matrix D.
        :rtype: numpy.ndarray
        """
        matrix = cdist(
                X1, X2, lambda x, y: self.basis(x-y, self.parameters.radius)
        )
        return matrix
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号