示例#1
0
def test_distance_generic_kullback():
    """Test logeuclid distance for generic function"""
    A = 2 * np.eye(3)
    B = 2 * np.eye(3)
    assert_equal(distance(A, B, metric='kullback'), distance_kullback(A, B))
    assert_equal(distance(A, B, metric='kullback_right'),
                 distance_kullback_right(A, B))
    assert_equal(distance(A, B, metric='kullback_sym'),
                 distance_kullback_sym(A, B))
示例#2
0
def test_distance_generic_logeuclid():
    """Test logeuclid distance for generic function"""
    A = 2 * np.eye(3)
    B = 2 * np.eye(3)
    assert_equal(distance(A, B, metric='logeuclid'), distance_logeuclid(A, B))
示例#3
0
def test_distance_generic_riemann():
    """Test riemannian distance for generic function"""
    A = 2 * np.eye(3)
    B = 2 * np.eye(3)
    assert_equal(distance(A, B, metric='riemann'), distance_riemann(A, B))