original_docstring:  
          Plot The error between the
          actual subframe execution time
          and estimated subframe execution
          time
      
docstring: Plot The error between the
  actual subframe execution time
  and estimated subframe execution
  time
docstring_tokens: Plot The error between the actual subframe execution time and estimated subframe execution time
code: def plot_err(file2,ext):
      """ 
          Plot The error between the
          actual subframe execution time
          and estimated subframe execution
          time
      """
      prb   = np.array(range(1,ptsl.W+1))  # 1-100 (100 values)
      alloc = np.array(range(2,ptsl.M+1))  # 2-26  (25 values)
      X,Y   = meshgrid(prb,alloc)
      
      stat      = np.load(file2)
      shape     = (len(alloc),len(prb))
      Z         = np.full(shape,-1.0)
      
      for m in alloc:
          for w in prb:
              # Index Shifting
              # Indices for Z
              w2 = w - 1
              m2 = m - 2
              # Indices for stat
              w3 = w - 1
              m3 = m - 1
  
              # print("w2 : %d,m2 : %d"%(w2,m2))
              # print("w3 : %d,m3 : %d"%(w3,m3))
              # print("Computed : %d, Actual : %d"%(stat[w3,m3,0],stat[w3,m3,1]))
              Z[m2,w2] = abs(stat[w3,m3,0]-stat[w3,m3,1])*100/stat[w3,m3,0]
      
      # Find the indices where Z is maximum
      m2,w2 = np.unravel_index(np.argmax(Z,axis=None),Z.shape)
      m = m2+2
      w = w2+1
      #np.savetxt("foo.csv", Z, delimiter=",")
      ds = pd.DataFrame(Z)
      #print(ds)
      ds.to_csv("Error-"+ext+".csv")
      #print("m : %.2f,w : %.2f"%(m,w))
      #print("Average ; %.2f\n" % (np.mean(Z)))
      #return
      fig  = plt.figure(figsize=(10,8))
      ax   = fig.gca(projection='3d')
      surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, 
                             cmap=cm.RdBu,linewidth=0, antialiased=False)
      ax.set_xlabel("PRBs")
      ax.set_ylabel("Cores")
      ax.set_zlabel("Error Percent")
      ax.set_title("Comparison of Actual and Estimated PDF (Max = "+str(np.max(Z))+"%)")
      fig.colorbar(surf, shrink=0.5, aspect=5)
      plt.savefig("Error-"+ext+".pdf")
code_tokens: def plot_err ( file2 , ext ) : prb = np . array ( range ( 1 , ptsl . W + 1 ) ) alloc = np . array ( range ( 2 , ptsl . M + 1 ) ) X , Y = meshgrid ( prb , alloc ) stat = np . load ( file2 ) shape = ( len ( alloc ) , len ( prb ) ) Z = np . full ( shape , - 1.0 ) for m in alloc : for w in prb : w2 = w - 1 m2 = m - 2 w3 = w - 1 m3 = m - 1 Z [ m2 , w2 ] = abs ( stat [ w3 , m3 , 0 ] - stat [ w3 , m3 , 1 ] ) * 100 / stat [ w3 , m3 , 0 ] m2 , w2 = np . unravel_index ( np . argmax ( Z , axis = None ) , Z . shape ) m = m2 + 2 w = w2 + 1 ds = pd . DataFrame ( Z ) ds . to_csv ( "Error-" + ext + ".csv" ) fig = plt . figure ( figsize = ( 10 , 8 ) ) ax = fig . gca ( projection = '3d' ) surf = ax . plot_surface ( X , Y , Z , rstride = 1 , cstride = 1 , cmap = cm . RdBu , linewidth = 0 , antialiased = False ) ax . set_xlabel ( "PRBs" ) ax . set_ylabel ( "Cores" ) ax . set_zlabel ( "Error Percent" ) ax . set_title ( "Comparison of Actual and Estimated PDF (Max = " + str ( np . max ( Z ) ) + "%)" ) fig . colorbar ( surf , shrink = 0.5 , aspect = 5 ) plt . savefig ( "Error-" + ext + ".pdf" )
short_docstring: Plot The error between the
  actual subframe execution time
  and estimated subframe execution
  time
short_docstring_tokens: Plot The error between the actual subframe execution time and estimated subframe execution time
comment: """ 
          Plot The error between the
          actual subframe execution time
          and estimated subframe execution
          time
      """$SEP$# 1-100 (100 values)$SEP$# 2-26  (25 values)$SEP$# Index Shifting$SEP$# Indices for Z$SEP$# Indices for stat$SEP$# print("w2 : %d,m2 : %d"%(w2,m2))$SEP$# print("w3 : %d,m3 : %d"%(w3,m3))$SEP$# print("Computed : %d, Actual : %d"%(stat[w3,m3,0],stat[w3,m3,1]))$SEP$# Find the indices where Z is maximum$SEP$#np.savetxt("foo.csv", Z, delimiter=",")$SEP$#print(ds)$SEP$#print("m : %.2f,w : %.2f"%(m,w))$SEP$#print("Average ; %.2f\n" % (np.mean(Z)))$SEP$#return