def training_set_multiplication(training_set, mult_queue):
    """
    Multiply the training set by all methods listed in mult_queue.

    Parameters
    ----------
    training_set :
        set of all recordings that will be used for training
    mult_queue :
        list of all algorithms that will take one recording and generate more
        than one.

    Returns
    -------
    mutliple recordings
    """
    logging.info("Multiply data...")
    for algorithm in mult_queue:
        new_trning_set = []
        for recording in training_set:
            samples = algorithm(recording['handwriting'])
            for sample in samples:
                new_trning_set.append({'id': recording['id'],
                                       'is_in_testset': 0,
                                       'formula_id': recording['formula_id'],
                                       'handwriting': sample,
                                       'formula_in_latex':
                                       recording['formula_in_latex']})
        training_set = new_trning_set
    return new_trning_set
def training_set_multiplication ( training_set , mult_queue ) : logging . info ( "Multiply data..." ) for algorithm in mult_queue : new_trning_set = [ ] for recording in training_set : samples = algorithm ( recording [ 'handwriting' ] ) for sample in samples : new_trning_set . append ( { 'id' : recording [ 'id' ] , 'is_in_testset' : 0 , 'formula_id' : recording [ 'formula_id' ] , 'handwriting' : sample , 'formula_in_latex' : recording [ 'formula_in_latex' ] } ) training_set = new_trning_set return new_trning_set
Multiply the training set by all methods listed in mult_queue.

    Parameters
    ----------
    training_set :
        set of all recordings that will be used for training
    mult_queue :
        list of all algorithms that will take one recording and generate more
        than one.

    Returns
    -------
    mutliple recordings