subspace.py 文件源码

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

项目:Matrix-Analysis 作者: kingofspace0wzz 项目源码 文件源码
def hausdorff_distance(X, Y, n):
    '''
    distace between subspaces by Hausdorff's definition
    '''
    if rank(X) != X.shape[1] & rank(Y) != Y.shape[1]:
        raise Exception('Please provide subspaces with full COLUMN rank')

    inner = 0

    for i in range(X.shape[1]):
        for j in range(Y.shape[1]):
            inner = inter + np.square(X[:, i].conjugate().T.dot(Y[:, j]))

    distance = np.sqrt(np.max(rank(X), rank(Y)) - inner)

    return distance

# distance with inner-product
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号