Beispiel #1
0
def test_Cospcovariances():
    """Test fit CospCovariances"""
    x = np.random.randn(2, 3, 1000)
    cov = CospCovariances()
    cov.fit(x)
    cov.fit_transform(x)
    assert_equal(cov.get_params(), dict(window=128, overlap=0.75, fmin=None,
                                        fmax=None, fs=None))
Beispiel #2
0
def test_Cospcovariances():
    """Test fit CospCovariances"""
    x = np.random.randn(2, 3, 1000)
    cov = CospCovariances()
    cov.fit(x)
    cov.fit_transform(x)
    assert_equal(cov.get_params(),
                 dict(window=128, overlap=0.75, fmin=None, fmax=None, fs=None))
Beispiel #3
0
def test_cosp_covariances(rndstate):
    """Test fit CospCovariances"""
    n_matrices, n_channels, n_times = 2, 3, 1000
    x = rndstate.randn(n_matrices, n_channels, n_times)
    cov = CospCovariances()
    cov.fit(x)
    covmats = cov.transform(x)
    assert cov.get_params() == dict(window=128,
                                    overlap=0.75,
                                    fmin=None,
                                    fmax=None,
                                    fs=None)
    n_freqs = 65
    assert covmats.shape == (n_matrices, n_channels, n_channels, n_freqs)
    assert is_spsd(covmats.transpose(0, 3, 1, 2))