简体   繁体   English

R中每小时数据的时间序列预测

[英]Time series forecast on Hourly Data in R

I have a CSV that has close to 2 months of data with data captured on an hourly basis. 我有一个CSV,其中包含将近2个月的数据,并且每小时要捕获一次数据。

The data set is as follows 数据集如下

Date_Time                    Freq
2018-06-01 01:00:00           232
2018-06-01 02:00:00           99
2018-06-01 03:00:00           90

Most time series examples mention this on yearly data. 大多数时间序列示例在年度数据中都提到了这一点。 I am a bit lost with how to do forecasting on an hourly basis. 我对如何按小时进行预测有些迷惑。 What would be the best way to do it in R. There are many examples online that uses h2o, knn, ARIMA etc. 在R中做到这一点的最佳方法是什么。在线上有很多使用h2o,knn,ARIMA等的示例。

 # R
df <- read.csv('../examples/example_yosemite_temps.csv')
m <- prophet(df, changepoint.prior.scale=0.01)
future <- make_future_dataframe(m, periods = 300, freq = 60 * 60)
fcst <- predict(m, future)
plot(m, fcst)

https://facebook.github.io/prophet/docs/non-daily_data.html https://facebook.github.io/prophet/docs/non-daily_data.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM