Exemplo n.º 1
0
def get_final_risk(trace):
    col_dict = get_column_dict( trace.db.analyze, 'i', 'salad_risk.tst', 'salad_risk.val', 'argmin_risk.tst', 'argmin_risk.val' ) 
    idx = np.argmax(col_dict.pop('i'))
    risk_dict = {}
    for key, col in col_dict.iteritems():
        risk_dict[key]= col[idx]
        
    return risk_dict
Exemplo n.º 2
0
def get_final_predictions(trace):
    prediction_dict = {}
    col_dict = get_column_dict( trace.db.predict, 'i', 'salad_predict.tst', 'salad_predict.val', 'argmin_predict.val', 'argmin_predict.tst' ) 
    idx = np.argmax(col_dict.pop('i'))
    for key, col in col_dict.iteritems():
        prediction_dict[key]= col[idx]
        
    return prediction_dict
Exemplo n.º 3
0
def get_final_risk(trace):
    col_dict = get_column_dict(trace.db.analyze, 'i', 'salad_risk.tst',
                               'salad_risk.val', 'argmin_risk.tst',
                               'argmin_risk.val')
    idx = np.argmax(col_dict.pop('i'))
    risk_dict = {}
    for key, col in col_dict.iteritems():
        risk_dict[key] = col[idx]

    return risk_dict
Exemplo n.º 4
0
def get_final_predictions(trace):
    prediction_dict = {}
    col_dict = get_column_dict(trace.db.predict, 'i', 'salad_predict.tst',
                               'salad_predict.val', 'argmin_predict.val',
                               'argmin_predict.tst')
    idx = np.argmax(col_dict.pop('i'))
    for key, col in col_dict.iteritems():
        prediction_dict[key] = col[idx]

    return prediction_dict