Esempio n. 1
0
def test_mean_riemann():
    covmats = CovMats.random(10, 10)
    old_dist = mean_riemann(covmats.numpy_array)
    covmats.reset_covmats_fields()
    new_dist = Mean.euclidean(covmats)

    return _get_state(old_dist, new_dist, "mean riemann")
Esempio n. 2
0
def test_mean_riemann():
    covmats = CovMats.random(10, 10)
    old_dist = mean_riemann(covmats.numpy_array)
    covmats.reset_covmats_fields()
    new_dist = Mean.euclidean(covmats)

    return _get_state(old_dist, new_dist, "mean riemann")
def compute(matrice_order, loop_number):
    tmp = numpy.random.rand(matrice_order, 2 * matrice_order)
    a = numpy.dot(tmp, tmp.T) / 1000

    l = [a]
    covmats = numpy.array(l)

    for i in range(0, loop_number):
        mean = mean_riemann(covmats)
        l += [geodesic_riemann(covmats[j, :, :], mean) for j in range(covmats.shape[0])]
        covmats = numpy.array(l)
def compute(matrice_order, loop_number):
    tmp = numpy.random.rand(matrice_order, 2 * matrice_order)
    a = numpy.dot(tmp, tmp.T) / 1000

    l = [a]
    covmats = numpy.array(l)

    for i in range(0, loop_number):
        mean = mean_riemann(covmats)
        l += [
            geodesic_riemann(covmats[j, :, :], mean)
            for j in range(covmats.shape[0])
        ]
        covmats = numpy.array(l)