Creating a custom trend
A key advantage of open source software is that any user can download the source code and make their own modifications to better suit the software to their own use case. Although nearly all common time series can be appropriately modeled with the three trend modes implemented in Prophet (piecewise linear, piecewise logistic, and flat), there may be cases when you need a different trend model than provided; as Prophet is open source, it is relatively easy to create whatever you need. A quick caveat though: it is relatively easy only conceptually. Mathematically, it can be quite complex, and you must have solid software engineering skills to understand how to modify the code successfully.
Let’s look at an example of what is possible. Consider a small clothing retailer, which updates its collection for each season:
df = pd.read_csv('../data/clothing_retailer.csv') df['ds'] = pd.to_datetime(df['ds'])
Daily sales are...