78702eecf195d8bbe1d45bb1597a1998807287e0,tests/test_classification.py,,generate_cov,#Any#Any#,5

Before Change



def generate_cov(Nt,Ne):
    Generate a set of cavariances matrices for test purpose
    np.random.seed(1234)
    diags = 2.0+0.1*np.random.randn(Nt,Ne)
    covmats = np.empty((Nt,Ne,Ne))
    for i in range(Nt):
        covmats[i] = np.diag(diags[i])
    return covmats

def test_MDM_init():
    Test init of MDM

After Change



def generate_cov(Nt, Ne):
    Generate a set of cavariances matrices for test purpose.
    rs = np.random.RandomState(1234)
    diags = 2.0 + 0.1 * rs.randn(Nt, Ne)
    A = 2*rs.rand(Ne, Ne) - 1
    A /= np.atleast_2d(np.sqrt(np.sum(A**2, 1))).T
    covmats = np.empty((Nt, Ne, Ne))
    for i in range(Nt):
        covmats[i] = np.dot(np.dot(A, np.diag(diags[i])), A.T)
    return covmats

def test_MDM_init():
    Test init of MDM
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 23

Instances


Project Name: alexandrebarachant/pyRiemann
Commit Name: 78702eecf195d8bbe1d45bb1597a1998807287e0
Time: 2016-07-25
Author: alexandre.barachant@gmail.com
File Name: tests/test_classification.py
Class Name:
Method Name: generate_cov


Project Name: alexandrebarachant/pyRiemann
Commit Name: f3308ce74b6c9cd5809af31470889e4bafd42a2f
Time: 2016-07-25
Author: alexandre.barachant@gmail.com
File Name: tests/test_utils_tangent_space.py
Class Name:
Method Name: generate_cov


Project Name: alexandrebarachant/pyRiemann
Commit Name: 30d6947e5fe2aeffd002a519344da0724a77d47f
Time: 2016-07-25
Author: alexandre.barachant@gmail.com
File Name: tests/test_tangentspace.py
Class Name:
Method Name: generate_cov


Project Name: alexandrebarachant/pyRiemann
Commit Name: 78702eecf195d8bbe1d45bb1597a1998807287e0
Time: 2016-07-25
Author: alexandre.barachant@gmail.com
File Name: tests/test_classification.py
Class Name:
Method Name: generate_cov


Project Name: alexandrebarachant/pyRiemann
Commit Name: 1b7580668466f593e202b77b25af054b3d14d59c
Time: 2016-07-25
Author: alexandre.barachant@gmail.com
File Name: tests/test_stats.py
Class Name:
Method Name: generate_cov