File size: 789 Bytes
5fae7ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import pickle
import matplotlib.pyplot as plt
import argparse
def main(picklefile):
with open(picklefile, 'rb') as f:
all_metrics = pickle.load(f)
plt.plot([i for i in range(len(all_metrics))], [a[1] for a in all_metrics])
plt.grid(True)
plt.ylim(0.0, 0.05)
plt.xlabel('Эпоха')
plt.ylabel('MAE$')
plt.show()
plt.plot([i for i in range(len(all_metrics))], [a[0] for a in all_metrics])
plt.grid(True)
plt.ylim(0.0, 1.0)
plt.xlabel('Эпоха')
plt.ylabel('$R^2$')
plt.show()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Process a pickle file')
parser.add_argument('picklefile', type=str, help='Path to pickle file')
args = parser.parse_args()
main(args.picklefile) |