7f5ffac4a2d292e215142c56fe97dcf53be560d6,cnvlib/smoothing.py,,rolling_median,#Any#Any#,34

Before Change


    result = np.empty_like(x)
    // Keep a copy of the rolling window in original order; initially fill with
    // a mirrored copy of the first "wing" points
    window = deque(np.concatenate((x[wing::-1], x[:wing])))
    // Also keep a sorted copy of the rolling window values
    sortwin = sorted(window)
    // Pad the right edge of the original array with a mirror copy
    signal = np.concatenate((x[wing:], x[:-wing-1:-1]))
    // Calculate the rolling median at each subsequent point
    for i, item in enumerate(signal):

After Change


    // Pad the edges of the original array with mirror copies
    signal = np.concatenate((x[wing-1::-1], x, x[:-wing-1:-1]))
    rolled = pd.rolling_median(signal, 2 * wing + 1, center=True)
    return rolled[wing:-wing]


def rolling_quantile(x, width, quantile):
    Rolling quantile (0--1) with mirrored edges.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: etal/cnvkit
Commit Name: 7f5ffac4a2d292e215142c56fe97dcf53be560d6
Time: 2016-01-06
Author: eric.talevich@gmail.com
File Name: cnvlib/smoothing.py
Class Name:
Method Name: rolling_median


Project Name: kengz/SLM-Lab
Commit Name: 4f2650759bd8a0cbd224f39dcc08dfa327c6122b
Time: 2018-12-01
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/replay.py
Class Name: AtariReplay
Method Name: __init__


Project Name: chainer/chainerrl
Commit Name: f5e8fce16e07a9408080be0ae64b8b2cd5685eeb
Time: 2018-04-20
Author: muupan@gmail.com
File Name: examples/ale/atari_wrappers.py
Class Name: FrameStack
Method Name: __init__


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 481cf745158704e5173ff6e4a26808ebb04dfc14
Time: 2017-12-24
Author: max.lapan@gmail.com
File Name: ch11/01_a3c_data.py
Class Name:
Method Name: data_func