304fb9ee4fb1adc49ecea7dc9aeaf2c40a5a77fe,pyannote/audio/signal.py,Peak,apply,#Peak#Any#Any#,197

Before Change


        indices = scipy.signal.argrelmax(y, order=order)[0]

        mini = np.nanpercentile(y, 1) if self.percentile else np.nanmin(y)
        maxi = np.nanpercentile(y, 99) if self.percentile else np.nanmax(y)
        threshold = mini + self.alpha * (maxi - mini)

        peak_time = np.array([sw[i].middle for i in indices if y[i] > threshold])

After Change


            mini = 0
            maxi = 1

        elif self.scale == "relative":
            mini = np.nanmin(data)
            maxi = np.nanmax(data)

        elif self.scale == "percentile":
            mini = np.nanpercentile(data, 1)
            maxi = np.nanpercentile(data, 99)

        threshold = mini + self.alpha * (maxi - mini)

        peak_time = np.array([sw[i].middle for i in indices if y[i] > threshold])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pyannote/pyannote-audio
Commit Name: 304fb9ee4fb1adc49ecea7dc9aeaf2c40a5a77fe
Time: 2018-06-29
Author: bredin@limsi.fr
File Name: pyannote/audio/signal.py
Class Name: Peak
Method Name: apply


Project Name: pyannote/pyannote-audio
Commit Name: 304fb9ee4fb1adc49ecea7dc9aeaf2c40a5a77fe
Time: 2018-06-29
Author: bredin@limsi.fr
File Name: pyannote/audio/signal.py
Class Name: Binarize
Method Name: apply


Project Name: pyannote/pyannote-audio
Commit Name: 715371e45047796c76f7ba27f1c504de03381b6a
Time: 2017-08-29
Author: hbredin@users.noreply.github.com
File Name: pyannote/audio/signal.py
Class Name: Peak
Method Name: apply