677cb13414d9c0089de24854837189d433c46e5d,nisl/tests/test_signals.py,,test_clean_detrending,#,52

Before Change



// The test is inspired from scipy docstring of detrend function
def test_clean_detrending():
    randgen = np.random.RandomState(0)
    npoints = 1e3
    noise = randgen.randn(npoints)
    x = 2 * np.linspace(0, 1, npoints) + noise
    x_detrended = signals.clean([x], standardize=False, detrend=True,
                                low_pass=None)[0]
    x_undetrended = signals.clean([x], standardize=False, low_pass=None)[0]
    assert_false((x_undetrended - noise).max() < 0.06)

After Change


// This test is inspired from scipy docstring of detrend function
def test_clean_detrending():
    point_number = 1000
    signals, noises, _ = generate_signals(feature_number=1,
                                          length=point_number)
    trend = np.atleast_2d(np.linspace(0, 2., point_number)).T
    x = signals + trend
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: nilearn/nilearn
Commit Name: 677cb13414d9c0089de24854837189d433c46e5d
Time: 2013-04-05
Author: philippe.gervais@inria.fr
File Name: nisl/tests/test_signals.py
Class Name:
Method Name: test_clean_detrending


Project Name: nilearn/nilearn
Commit Name: 1a9e8de6d6a3c3663f50a3851c187282b7cc6633
Time: 2015-12-04
Author: arthur.mensch@m4x.org
File Name: nilearn/decomposition/tests/test_canica.py
Class Name:
Method Name: test_component_sign


Project Name: mne-tools/mne-python
Commit Name: 2dd7aa0bd05f3cae8dc5c17e951454ef6c71b17c
Time: 2019-04-24
Author: larson.eric.d@gmail.com
File Name: mne/decoding/tests/test_receptive_field.py
Class Name:
Method Name:


Project Name: probcomp/bayeslite
Commit Name: 943da0020c5633f03f10aeaca134167647a43b0c
Time: 2015-09-04
Author: riastradh+probcomp@csail.mit.edu
File Name: src/stats.py
Class Name:
Method Name: chi2_sf


Project Name: mne-tools/mne-python
Commit Name: 4a52511469992d2abe0686bc6d1588f7469cbb3f
Time: 2019-05-08
Author: larson.eric.d@gmail.com
File Name: mne/decoding/tests/test_receptive_field.py
Class Name:
Method Name: test_inverse_coef