non-daily_data.md (prophet-1.0) | : | non-daily_data.md (prophet-1.1) | ||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
id: data-with-regular-gaps | id: data-with-regular-gaps | |||
- title: Monthly data | - title: Monthly data | |||
id: monthly-data | id: monthly-data | |||
- title: Holidays with aggregated data | - title: Holidays with aggregated data | |||
id: holidays-with-aggregated-data | id: holidays-with-aggregated-data | |||
--- | --- | |||
<a id="sub-daily-data"> </a> | <a id="sub-daily-data"> </a> | |||
## Sub-daily data | ## Sub-daily data | |||
Prophet can make forecasts for time series with sub-daily observations by passin g in a dataframe with timestamps in the `ds` column. The format of the timestamp s should be YYYY-MM-DD HH:MM:SS - see the example csv [here](https://github.com/ facebook/prophet/blob/master/examples/example_yosemite_temps.csv). When sub-dail y data are used, daily seasonality will automatically be fit. Here we fit Prophe t to data with 5-minute resolution (daily temperatures at Yosemite): | Prophet can make forecasts for time series with sub-daily observations by passin g in a dataframe with timestamps in the `ds` column. The format of the timestamp s should be YYYY-MM-DD HH:MM:SS - see the example csv [here](https://github.com/ facebook/prophet/blob/main/examples/example_yosemite_temps.csv). When sub-daily data are used, daily seasonality will automatically be fit. Here we fit Prophet to data with 5-minute resolution (daily temperatures at Yosemite): | |||
```R | ```R | |||
# R | # R | |||
df <- read.csv('../examples/example_yosemite_temps.csv') | df <- read.csv('../examples/example_yosemite_temps.csv') | |||
m <- prophet(df, changepoint.prior.scale=0.01) | m <- prophet(df, changepoint.prior.scale=0.01) | |||
future <- make_future_dataframe(m, periods = 300, freq = 60 * 60) | future <- make_future_dataframe(m, periods = 300, freq = 60 * 60) | |||
fcst <- predict(m, future) | fcst <- predict(m, future) | |||
plot(m, fcst) | plot(m, fcst) | |||
``` | ``` | |||
```python | ```python | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |