f61f339dbc1782f7c5cd6cee6e3a5cd4758622bb,neurodsp/aperiodic/dfa.py,,compute_detrended_fluctuation,#Any#Any#Any#,117

Before Change


    

    // Gather windows & vectorize, so we can call math functions in one go
    n_win = int(np.floor(len(sig) / win_len))
    sig_rect = np.reshape(sig[:n_win * win_len], (n_win, win_len)).T

    // Calculate local trend, as the line of best fit within the time window
    _, fluc, _, _, _ = np.polyfit(np.arange(win_len), sig_rect, deg=deg, full=True)

After Change


    

    // Calculate cumulative sum of the signal & split the signal into segments
    segments = split_signal(sp.cumsum(sig - np.mean(sig)), win_len).T

    // Calculate local trend, as the line of best fit within the time window
    _, fluc, _, _, _ = np.polyfit(np.arange(win_len), segments, deg=deg, full=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: neurodsp-tools/neurodsp
Commit Name: f61f339dbc1782f7c5cd6cee6e3a5cd4758622bb
Time: 2019-10-09
Author: tdonoghue@ucsd.edu
File Name: neurodsp/aperiodic/dfa.py
Class Name:
Method Name: compute_detrended_fluctuation


Project Name: soft-matter/trackpy
Commit Name: ad022c169dbbc3b3f3c42cfa743b0d744c13d88d
Time: 2017-12-06
Author: caspervdw@gmail.com
File Name: trackpy/tests/test_feature.py
Class Name: CommonFeatureIdentificationTests
Method Name: test_ep


Project Name: minerva-ml/open-solution-data-science-bowl-2018
Commit Name: 1c1914df24c211aea45b42146940c9a7b770cbee
Time: 2018-07-19
Author: kamil.kaczmarek@neptune.ml
File Name: postprocessing.py
Class Name:
Method Name: mean_blob_size


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: b09284f6ba59659a9819e68244a7a785016c87c5
Time: 2020-05-24
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/shadow_attack.py
Class Name: ShadowAttack
Method Name: generate