示例#1
0
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)
示例#2
0
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)
示例#3
0
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)