湿度的时间序列预测

2024-09-30 00:40:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我有以下输入值,并希望预测时间戳列表中的值的湿度值

startDate = "2013-01-01"
endDate = "2013-01-01"
knownTimestamps = ['2013-01-01 00:00','2013-01-01 01:00','2013-01-01 02:00','2013-01-01 03:00','2013-01-01 04:00',
               '2013-01-01 05:00','2013-01-01 06:00','2013-01-01 08:00','2013-01-01 10:00','2013-01-01 11:00',
               '2013-01-01 12:00','2013-01-01 13:00','2013-01-01 16:00','2013-01-01 17:00','2013-01-01 18:00',
               '2013-01-01 19:00','2013-01-01 20:00','2013-01-01 21:00','2013-01-01 23:00']
humidity = ['0.62','0.64','0.62','0.63','0.63','0.64','0.63','0.64','0.48','0.46','0.45','0.44','0.46','0.47','0.48','0.49','0.51','0.52','0.52']
timestamps = ['2013-01-01 07:00','2013-01-01 09:00','2013-01-01 14:00','2013-01-01 15:00','2013-01-01 22:00'] 

我使用python中的AR模型使用下面的函数来预测湿度值

^{pr2}$

该模型预测了时间戳列表中的相同湿度值。在

 res = predictMissingHumidity(startDate, endDate, knownTimestamps, humidity, timestamps) 
 print(res)


 output = [0.5287247355700563, 0.5287247355700563, 0.5287247355700563,
 0.5287247355700563, 0.5287247355700563]  

有人能帮我解决我的问题吗


Tags: 函数模型列表时间resarprint湿度

热门问题