query_expansion.py 文件源码

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

项目:vec4ir 作者: lgalke 项目源码 文件源码
def delta(X, Y, n_jobs=-1, a=1, c=0):
    """Pairwise delta function: cosine and sigmoid

    :X: TODO
    :returns: TODO

    """
    D = pairwise_distances(X, Y, metric="cosine", n_jobs=n_jobs)
    if c != 0:
        D -= c
    if a != 1:
        D *= a
    D = expit(D)
    return D
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号