Exemplo n.º 1
0
 def readDataDrivenScales(self):
     tempScales = {}
     with open('temp/Predictor/dump.profile', 'r') as f:
         for line in f:
             entries = line.strip().split(",")
             var, m, M = entries
             m, M = float(m), float(M)
             tempScales[var] = util.computeScalingFactor(max(abs(m), abs(M))) 
     return tempScales
Exemplo n.º 2
0
def computeScale(m, M):
    maxAbs = max(abs(m), abs(M))
    return Util.computeScalingFactor(maxAbs)