()
return id_to_results
Maps studies to their respective targets.
Maps studies to their respective targets.
Maps studies to their respective targets .
def map_studies_results():
    """
    Maps studies to their respective targets.
    """
    id_to_results = dict()
    train_csv = open('data/train.csv')
    lines = train_csv.readlines()
    i = 0
    for item in lines:
        if i == 0:
            i = 1
            continue
        id, diastole, systole = item.replace('\n', '').split(',')
        id_to_results[id] = [float(diastole), float(systole)]

    return id_to_results
def map_studies_results ( ) : id_to_results = dict ( ) train_csv = open ( 'data/train.csv' ) lines = train_csv . readlines ( ) i = 0 for item in lines : if i == 0 : i = 1 continue id , diastole , systole = item . replace ( '\n' , '' ) . split ( ',' ) id_to_results [ id ] = [ float ( diastole ) , float ( systole ) ] return id_to_results