Exemple #1
0
def ScoreCalculate(trainDataOfEnc, M, T_cols):
    encDist = np.zeros((trainDataNums, 1 + T_cols),
                       dtype=object)  #这里存疑,需要告知云端T_cols吗
    for i in range(trainDataNums):
        temp = trainDataOfEnc[i]
        encDist[i] = (mvhe.KeySwitch(M, temp))
    return encDist  # send the encDist to the user
Exemple #2
0
def ScoreCalculate(trainDataOfEnc, M, T_cols):
    encDist = np.zeros((trainDataOfEnc.shape[0], M.shape[0]), dtype=object)
    for i in range(trainDataOfEnc.shape[0]):
        temp = trainDataOfEnc[i]
        encDist[i] = (mvhe.KeySwitch(M, temp))
    return encDist  # send the encDist to the user