README.md in prophet-rb-0.3.2 vs README.md in prophet-rb-0.4.0
- old
+ new
@@ -78,10 +78,20 @@
## Advanced API
Check out the [Prophet documentation](https://facebook.github.io/prophet/docs/quick_start.html) for a great explanation of all of the features. The advanced API follows the Python API and supports the same features. It uses [Rover](https://github.com/ankane/rover) for data frames.
+- [Quick Start](#advanced-quick-start)
+- [Plots](#plots)
+- [Saturating Forecasts](#saturating-forecasts)
+- [Trend Changepoints](#trend-changepoints)
+- [Holidays and Special Events](#holidays-and-special-events)
+- [Multiplicative Seasonality](#multiplicative-seasonality)
+- [Uncertainty Intervals](#uncertainty-intervals)
+- [Non-Daily Data](#non-daily-data)
+- [Saving Models](#saving-models)
+
## Advanced Quick Start
[Explanation](https://facebook.github.io/prophet/docs/quick_start.html)
Create a data frame with `ds` and `y` columns - here’s [an example](examples/example_wp_log_peyton_manning.csv) you can use
@@ -295,9 +305,27 @@
df = Rover.read_csv("example_yosemite_temps.csv")
m = Prophet.new(changepoint_prior_scale: 0.01).fit(df)
future = m.make_future_dataframe(periods: 300, freq: "H")
forecast = m.predict(future)
```
+
+## Saving Models
+
+[Explanation](https://facebook.github.io/prophet/docs/additional_topics.html#saving-models)
+
+Save a model
+
+```ruby
+File.write("model.json", m.to_json)
+```
+
+Load a model
+
+```ruby
+m = Prophet.from_json(File.read("model.json"))
+```
+
+Uses the same format as Python, so models can be saved and loaded in either language
## Resources
- [Forecasting at Scale](https://peerj.com/preprints/3190.pdf)