b3cf6fd0c65394a97c2dbcff6dd835de5006e10f,featurex/extractors/audio.py,STFTExtractor,_extract,#STFTExtractor#Any#,74

Before Change



        for i, tb in enumerate(time_bins):
            ev = Event(onset=tb, duration=self.frame_size)
            value_data = {}
            for fb in self.freq_bins:
                label = "%d_%d" % fb
                start, stop = fb
                val = data[i, start:stop].mean()
                if np.isinf(val):
                    val = 0.
                value_data[label] = val
            ev.add_value(Value(stim, self, value_data))
            events.append(ev)
        return events

After Change


            self.freq_bins = bins

        features = ["%d_%d" % fb for fb in self.freq_bins]
        index = [tb for tb in time_bins]
        values = np.zeros((len(index), len(features)))
        for i, fb in enumerate(self.freq_bins):
            start, stop = fb
            values[:, i] = data[:, start:stop].mean(1)
        values = np.nan_to_num(values)
        return ExtractorResult(values, stim, self, features=features,
                               onsets=index, durations=self.hop_size)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: tyarkoni/pliers
Commit Name: b3cf6fd0c65394a97c2dbcff6dd835de5006e10f
Time: 2016-10-12
Author: tyarkoni@gmail.com
File Name: featurex/extractors/audio.py
Class Name: STFTExtractor
Method Name: _extract


Project Name: scikit-learn-contrib/DESlib
Commit Name: 0e17f47e9a4920e276bb61b60d6de16264bc6bcf
Time: 2017-12-29
Author: rafaelmenelau@gmail.com
File Name: pythonds/util/aggregation.py
Class Name:
Method Name: majority_voting


Project Name: scikit-learn-contrib/DESlib
Commit Name: 0e17f47e9a4920e276bb61b60d6de16264bc6bcf
Time: 2017-12-29
Author: rafaelmenelau@gmail.com
File Name: pythonds/util/aggregation.py
Class Name:
Method Name: weighted_majority_voting