import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.metrics import mean_squared_error
from sklearn.metrics import r2_score
from sklearn.metrics import mean_absolute_error # 平方绝对误差
from math import sqrt
import matplotlib as mpl
import pylab
df = pd.read_csv('da_rnn_result.csv')
y_test=df['y_test']
y_pred=df['y_pred']
fig1 = plt.figure(figsize=(10,4))
t = np.arange(len(y_test))
font2 = {'family' : 'Times New Roman',
'weight' : 'normal',
'size' : 16,
}
plt.xlabel('Data',font2)
plt.ylabel('Dosing',font2)
plt.plot(t, y_test, linewidth=1.5, label='Actual')
plt.plot(t, y_pred, linewidth=1.5, label='Predict')
plt.legend()
plt.xticks(fontproperties = 'Times New Roman', size = 16)
plt.yticks(fontproperties = 'Times New Roman', size = 16)
plt.show()
plt.show()
2021-10-24 画图
最新推荐文章于 2023-04-07 18:15:58 发布