e90157e7f01c85e9ef22f9679f1a40bda0efb51f,src/utils/utils.py,,split_data,#Any#Any#Any#,26

Before Change


        return imresize(image_array, size)

def split_data(ground_truth_data, training_ratio=.8, do_shuffle=False):
    ground_truth_keys = sorted(ground_truth_data.keys())
    if do_shuffle == True:
        shuffle(ground_truth_keys)
    num_train = int(round(training_ratio * len(ground_truth_keys)))
    train_keys = ground_truth_keys[:num_train]

After Change



def split_data(x, y, validation_split=.2):
    num_samples = len(x)
    num_train_samples = int((1 - validation_split)*num_samples)
    train_x = x[:num_train_samples]
    train_y = y[:num_train_samples]
    val_x = x[num_train_samples:]
    val_y = y[num_train_samples:]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: oarriaga/face_classification
Commit Name: e90157e7f01c85e9ef22f9679f1a40bda0efb51f
Time: 2017-06-30
Author: arriaga.camargo@gmail.com
File Name: src/utils/utils.py
Class Name:
Method Name: split_data


Project Name: SINGROUP/dscribe
Commit Name: ef323322767303c1a19d058d2f03d06f410ac130
Time: 2018-10-08
Author: lauri.himanen@aalto.fi
File Name: describe/descriptors/mbtr.py
Class Name: MBTR
Method Name: K2


Project Name: SINGROUP/dscribe
Commit Name: ef323322767303c1a19d058d2f03d06f410ac130
Time: 2018-10-08
Author: lauri.himanen@aalto.fi
File Name: describe/descriptors/mbtr.py
Class Name: MBTR
Method Name: K3