code: def plotAccuracyAndMCsDuringDecrementChange(results, title="", yaxis=""):
    
  
    decrementRange = []
    mcRange = []
    for r in results:
      if r["basalPredictedSegmentDecrement"] not in decrementRange:
        decrementRange.append(r["basalPredictedSegmentDecrement"])
      if r["inputSize"] not in mcRange:
        mcRange.append(r["inputSize"])
    decrementRange.sort()
    mcRange.sort()
    print decrementRange
    print mcRange
  
    ########################################################################
    #
    # Accumulate all the results per column in a convergence array.
    #
    # accuracy[o,f] = accuracy with o objects in training
    # and f unique features.
    accuracy = numpy.zeros((len(mcRange), len(decrementRange)))
    TMAccuracy = numpy.zeros((len(mcRange), len(decrementRange)))
    totals = numpy.zeros((len(mcRange), len(decrementRange)))
    for r in results:
      dec = r["basalPredictedSegmentDecrement"]
      nf = r["inputSize"]
      accuracy[mcRange.index(nf), decrementRange.index(dec)] += r["objectAccuracyL2"]
      TMAccuracy[mcRange.index(nf), decrementRange.index(dec)] += r["sequenceCorrectClassificationsTM"]
      totals[mcRange.index(nf), decrementRange.index(dec)] += 1
  
    for i,f in enumerate(mcRange):
      print i, f, accuracy[i] / totals[i]
      print i, f, TMAccuracy[i] / totals[i]
      print i, f, totals[i]
      print
docs: Plot accuracy vs decrement value