def getRealValue(data_test): q = [] f = open(data_test,'r') for line in f: q.append(int(line.split(' ')[0])) f.close() return np.array(q)
def getPredictionsOption(predictions, option): q = [] f = open(predictions,'r') for line in f: if float(line) >= option : q.append(1) elif float(line) < option: q.append(-1) f.close() return np.array(q)
def getPredictions(predictions): q = [] f = open(predictions,'r') for line in f: if float(line) >= 0.61 : q.append(1) elif float(line) < 0.61: q.append(-1) f.close() return np.array(q)