gaussian_process.py 文件源码

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

项目:probabilistic_line_search 作者: ProbabilisticNumerics 项目源码 文件源码
def kd(self, x, y):
    """Derivative of kernel function, 1st derivative w.r.t. right argument."""
    for arg in [x, y]:
      assert isinstance(arg, (float, np.float32, np.float64)) or \
             (isinstance(arg, np.ndarray) and np.rank(arg) == 1)
    xx = x + self.offset
    yy = y + self.offset
    return self.theta**2 * np.where(x<y, 0.5*xx**2, xx*yy-0.5*yy**2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号