| 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) |