bd1fa163ba2e3a02da40151c9ab5e498878800e9,riot_neuralnet/data.py,,get_raw_training_labels,#,68

Before Change



    labels = dict()

    for i, key in enumerate(prelabels):
        row = prelabels[key]
        numImages = row[0]

        increment = list()
        for j in range(4):
            increment.append((row[2][j] - row[1][j]) / numImages)

        rowLabels = list()
        for k in range(numImages):
            newLabel = list()
            for labelIdx in range(4):
                newLabel.append(increment[labelIdx]*k+(row[1][labelIdx]))
            rowLabels.append(newLabel)
        labels[key] = rowLabels

    return labels

After Change


                           9: [10, [.6, .4, .4, .7], [.9, .1, .1, .9]],
                           10: [10, [.1, .5, .2, .1], [.7, .2, .2, .5]]}
    labels = dict()
    for time_series_key in raw_training_labels:
        time_series = raw_training_labels[time_series_key]
        num_images = time_series[0]
        increment = [(time_series[2][emotion_dimension_idx] - time_series[1][emotion_dimension_idx]) / num_images for emotion_dimension_idx in range(4)]
        labels[time_series_key] = [[increment[label_idx]*image_idx + (time_series[1][label_idx]) for label_idx in range(4)] for image_idx in range(num_images)]

    return labels


// -------------------------------- UNUSED -------------------------------------- //
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: thoughtworksarts/EmoPy
Commit Name: bd1fa163ba2e3a02da40151c9ab5e498878800e9
Time: 2017-12-19
Author: angelica.perez37@gmail.com
File Name: riot_neuralnet/data.py
Class Name:
Method Name: get_raw_training_labels


Project Name: deepchem/deepchem
Commit Name: c09ca92e84f45c61f9213a32c7f01627fd467174
Time: 2017-04-12
Author: Karl
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name:
Method Name: _enqueue_batch


Project Name: home-assistant/home-assistant
Commit Name: d91fe792c56d872e9054fd608978fd51a99142dd
Time: 2015-11-27
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 5fba67f6c37a7c36935e4f9cb227b21f1b7a1c7b
Time: 2015-11-29
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: bokeh/bokeh
Commit Name: ded044ebee429e8e1b8dbd7e581bfb9634be7354
Time: 2015-09-08
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/line_builder.py
Class Name: LineBuilder
Method Name: _yield_renderers