-
-
Save wannaphong/f74625ec7e02a0c7ff57169ae7e80d7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ทำนายแบบแสดงกราฟ 10 ปี | |
time2 = pd.date_range('2018', periods=10, freq='A') | |
data2=pd.DataFrame({'date':time2.values}) | |
data2['date_ordinal'] = data2['date'].apply(lambda x: x.toordinal()) | |
x= data2[['date_ordinal']] | |
aa=pd.DataFrame({'date':time2,'value':model.predict(x)}) | |
plt.plot(listtime+time2.tolist(),thai+list(model.predict(x))) # หากเติม a1 กับ thai จะแสดงปีทั้งหมดรวมถึงที่ทำนาย | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment