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


                           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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

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: tyarkoni/pliers
Commit Name: 3ab4b8614054e9920676ae479df1ff4c2c2e438b
Time: 2018-02-13
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api.py
Class Name: IndicoAPIExtractor
Method Name: _extract


Project Name: pliablepixels/zmeventnotification
Commit Name: 1e619d91956c813d2328a5460da0a273fe135905
Time: 2019-11-15
Author: pliablepixels@gmail.com
File Name: hook/zmes_hook_helpers/face.py
Class Name: Face
Method Name: detect