def manualWeight(self, data, target): w = 0 X = np.zeros((np.size(data, 0) * 4, np.size(data, 1))) Y = np.zeros(len(target) * 4) for i in range(len(data)): PlayType, Result = restorePlayType(target[i]) for j in range(sFunction(Result)): X[w, :] = data[i, :] Y[w] = target[i] w += 1 return X, Y
def manualWeight(self, data, target): w=0 X = np.zeros((np.size(data,0)*4, np.size(data,1))) Y = np.zeros(len(target)*4) for i in range(len(data)): PlayType, Result = restorePlayType(target[i]) for j in range(sFunction(Result)): X[w,:] = data[i,:] Y[w] = target[i] w += 1 return X, Y
def recommendationSingle(self, classType): PlayType, Result = restorePlayType(classType) if gFunction(Result) < 0.0001: PlayType = self.switchPlayType(PlayType) recommendationCalss = (PlayType - 1) * 10 + Result return recommendationCalss
def recommendationSingle(self,classType): PlayType, Result = restorePlayType(classType) if gFunction(Result) < 0.0001: PlayType = self.switchPlayType(PlayType) recommendationCalss = (PlayType-1)*10 + Result return recommendationCalss