caf7f0ae508bd8a5212d0ed5a928ad667c57efd8,data_utils.py,,generator_from_raw_dataset,#Any#Any#Any#Any#Any#Any#Any#,328

Before Change


    num_voices = len(voice_ids)
    // Set chorale_indices
    if phase == "train":
        chorale_indices = np.arange(int(len(X) * percentage_train))
    if phase == "test":
        chorale_indices = np.arange(int(len(X) * percentage_train), len(X))
    if phase == "all":

After Change


    num_voices = len(voice_ids)
    // Set chorale_indices
    total_size = len(X)
    training_size = int(round(total_size * percentage_train))
    if phase == "train":
        chorale_indices = np.arange(training_size)
    if phase == "test":
        chorale_indices = np.arange(training_size, total_size)
    if phase == "all":
        chorale_indices = np.arange(total_size)

    assert len(chorale_indices) > 0, "The list of chorales for the phase "%s" must not be empty" % phase
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Ghadjeres/DeepBach
Commit Name: caf7f0ae508bd8a5212d0ed5a928ad667c57efd8
Time: 2017-07-12
Author: bohumir.zamecnik@gmail.com
File Name: data_utils.py
Class Name:
Method Name: generator_from_raw_dataset


Project Name: chartbeat-labs/textacy
Commit Name: 2d73fbbe9ec240ff700f9abeb30f12861044389e
Time: 2019-07-14
Author: burtdewilde@gmail.com
File Name: textacy/ke/sgrank.py
Class Name:
Method Name: sgrank


Project Name: mathics/Mathics
Commit Name: 835cd395cdb4800dd02365cf508d6ca0702920eb
Time: 2016-09-05
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/inout.py
Class Name:
Method Name: number_form