densities.py 文件源码

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

项目:GPflow 作者: GPflow 项目源码 文件源码
def student_t(x, mean, scale, deg_free):
    const = tf.lgamma(tf.cast((deg_free + 1.) * 0.5, settings.float_type))\
        - tf.lgamma(tf.cast(deg_free * 0.5, settings.float_type))\
        - 0.5*(tf.log(tf.square(scale)) + tf.cast(tf.log(deg_free), settings.float_type)
               + np.log(np.pi))
    const = tf.cast(const, settings.float_type)
    return const - 0.5*(deg_free + 1.) * \
        tf.log(1. + (1. / deg_free) * (tf.square((x - mean) / scale)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号