ium_s434700/evaluation/plot.py

15 lines
375 B
Python
Raw Normal View History

2021-05-27 16:38:23 +02:00
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')