README.md in prophet-rb-0.4.1 vs README.md in prophet-rb-0.4.2

- old
+ new

@@ -85,10 +85,11 @@ - [Saturating Forecasts](#saturating-forecasts) - [Trend Changepoints](#trend-changepoints) - [Holidays and Special Events](#holidays-and-special-events) - [Multiplicative Seasonality](#multiplicative-seasonality) - [Uncertainty Intervals](#uncertainty-intervals) +- [Outliers](#outliers) - [Non-Daily Data](#non-daily-data) - [Diagnostics](#diagnostics) - [Additional Topics](#additional-topics) ## Advanced Quick Start @@ -226,15 +227,17 @@ Create a data frame with `holiday` and `ds` columns. Include all occurrences in your past data and future occurrences you’d like to forecast. ```ruby playoffs = Rover::DataFrame.new( "holiday" => "playoff", - "ds" => ["2008-01-13", "2009-01-03", "2010-01-16", - "2010-01-24", "2010-02-07", "2011-01-08", - "2013-01-12", "2014-01-12", "2014-01-19", - "2014-02-02", "2015-01-11", "2016-01-17", - "2016-01-24", "2016-02-07"], + "ds" => [ + "2008-01-13", "2009-01-03", "2010-01-16", + "2010-01-24", "2010-02-07", "2011-01-08", + "2013-01-12", "2014-01-12", "2014-01-19", + "2014-02-02", "2015-01-11", "2016-01-17", + "2016-01-24", "2016-02-07" + ], "lower_window" => 0, "upper_window" => 1 ) superbowls = Rover::DataFrame.new( "holiday" => "superbowl", @@ -285,29 +288,53 @@ ## Multiplicative Seasonality [Explanation](https://facebook.github.io/prophet/docs/multiplicative_seasonality.html) +Specify multiplicative seasonality + ```ruby df = Rover.read_csv("example_air_passengers.csv") m = Prophet.new(seasonality_mode: "multiplicative") m.fit(df) future = m.make_future_dataframe(periods: 50, freq: "MS") forecast = m.predict(future) ``` +Specify mode when adding seasonality and regressors + +```ruby +m = Prophet.new(seasonality_mode: "multiplicative") +m.add_seasonality(name: "quarterly", period: 91.25, fourier_order: 8, mode: "additive") +m.add_regressor("regressor", mode: "additive") +``` + ## Uncertainty Intervals +[Explanation](https://facebook.github.io/prophet/docs/uncertainty_intervals.html) + Specify the width of uncertainty intervals (80% by default) ```ruby Prophet.new(interval_width: 0.95) ``` Get uncertainty in seasonality ```ruby Prophet.new(mcmc_samples: 300) +``` + +## Outliers + +[Explanation](https://facebook.github.io/prophet/docs/outliers.html) + +Remove outliers + +```ruby +df = Rover.read_csv("example_wp_log_R_outliers1.csv") +df["y"][(df["ds"] > "2010-01-01") & (df["ds"] < "2011-01-01")] = Float::NAN +m = Prophet.new.fit(df) ``` ## Non-Daily Data [Explanation](https://facebook.github.io/prophet/docs/non-daily_data.html)