ium_s434700/evaluation/plot.py
Filip Izydorczyk f2c10e7647 evaluation
2021-05-27 16:38:23 +02:00

15 lines
375 B
Python

import matplotlib.pyplot as plt
import pandas as pd
results = pd.read_csv('model_results.csv')
x_train = results['x']
y_train = results['y']
predicted = results['predicted_y']
plt.clf()
plt.plot(x_train, y_train, 'go', label='True data', alpha=0.5)
plt.plot(x_train, predicted, '--', label='Predictions', alpha=0.5)
plt.legend(loc='best')
plt.savefig('model_results.png')