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

Before Change


            self.freq_bins = bins

        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


class MeanAmplitudeExtractor(TranscribedAudioExtractor):

After Change


        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)


class MeanAmplitudeExtractor(TranscribedAudioExtractor):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: tyarkoni/pliers
Commit Name: e5e5ee0c3f7f7438a2519d32458fa72ea7af98e4
Time: 2016-10-23
Author: quinten.mcnamara@gmail.com
File Name: featurex/extractors/google.py
Class Name: GoogleVisionAPIExtractor
Method Name: _extract


Project Name: tyarkoni/pliers
Commit Name: c19000b012bba5fa7ae54fadc953f5b679dead4f
Time: 2016-10-20
Author: quinten.mcnamara@gmail.com
File Name: featurex/extractors/video.py
Class Name: DenseOpticalFlowExtractor
Method Name: _extract