code: def learningCurve(expPath, suite):
    
    print("\nLEARNING CURVE ================",expPath,"=====================")
    try:
      headers=["testResults","validation","bgResults","elapsedTime"]
      result = suite.get_value(expPath, 0, headers, "all")
      info = []
      maxValidationAccuracy = -1.0
      maxTestAccuracy = -1.0
      maxBGAccuracy = -1.0
      maxIter = -1
      for i,v in enumerate(zip(result["testResults"],result["validation"],
                               result["bgResults"], result["elapsedTime"])):
        info.append([i, v[0]["testerror"], v[1]["testerror"], v[2]["testerror"], int(v[3])])
        if v[1]["testerror"] > maxValidationAccuracy:
          maxValidationAccuracy = v[1]["testerror"]
          maxTestAccuracy = v[0]["testerror"]
          maxBGAccuracy = v[2]["testerror"]
          maxIter = i
      headers.insert(0,"iteration")
      print(tabulate(info, headers=headers, tablefmt="grid"))
  
      print("Max validation score =", maxValidationAccuracy, " at iteration", maxIter)
      print("Test score at that iteration =", maxTestAccuracy)
      print("BG score at that iteration =", maxBGAccuracy)
    except:
      print("Couldn't load experiment",expPath)
docs: Print the test, validation and other scores from each iteration of this
    experiment.  We select the test score that corresponds to the iteration with
    maximum validation accuracy.