How it works...
Prophet was designed for analyzing time series with daily observations (which does not mean that there are no ways to use weekly or monthly data) that exhibit patterns on different time scales (weekly, monthly, yearly, and so on).
In Step 2, we downloaded daily gold prices from Quandl and created a pandas DataFrame with two columns: ds, indicating the timestamp, and y, which is the target variable. This structure (column names) is required for working with Prophet. Then, we split the DataFrame into training (years 2000-2004) and test (the year 2005) sets by slicing over time.
In Step 4, we instantiated the model with additive seasonality. Additionally, we added the monthly seasonality by using the add_seasonality method with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access