prophet-rb 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +28 -0
  5. data/data-raw/LICENSE-holidays.txt +20 -0
  6. data/data-raw/README.md +3 -0
  7. data/data-raw/generated_holidays.csv +29302 -61443
  8. data/lib/prophet/forecaster.rb +190 -0
  9. data/lib/prophet/version.rb +1 -1
  10. data/lib/prophet.rb +4 -0
  11. data/stan/{unix/prophet.stan → prophet.stan} +8 -7
  12. data/vendor/aarch64-linux/bin/prophet +0 -0
  13. data/vendor/aarch64-linux/lib/libtbb.so.2 +0 -0
  14. data/vendor/aarch64-linux/lib/libtbbmalloc.so.2 +0 -0
  15. data/vendor/aarch64-linux/lib/libtbbmalloc_proxy.so.2 +0 -0
  16. data/vendor/aarch64-linux/licenses/sundials-license.txt +25 -63
  17. data/vendor/aarch64-linux/licenses/sundials-notice.txt +21 -0
  18. data/vendor/arm64-darwin/bin/prophet +0 -0
  19. data/vendor/arm64-darwin/lib/libtbb.dylib +0 -0
  20. data/vendor/arm64-darwin/lib/libtbbmalloc.dylib +0 -0
  21. data/vendor/arm64-darwin/licenses/sundials-license.txt +25 -63
  22. data/vendor/arm64-darwin/licenses/sundials-notice.txt +21 -0
  23. data/vendor/x86_64-darwin/bin/prophet +0 -0
  24. data/vendor/x86_64-darwin/lib/libtbb.dylib +0 -0
  25. data/vendor/x86_64-darwin/lib/libtbbmalloc.dylib +0 -0
  26. data/vendor/x86_64-darwin/licenses/sundials-license.txt +25 -63
  27. data/vendor/x86_64-darwin/licenses/sundials-notice.txt +21 -0
  28. data/vendor/x86_64-linux/bin/prophet +0 -0
  29. data/vendor/x86_64-linux/lib/libtbb.so.2 +0 -0
  30. data/vendor/x86_64-linux/lib/libtbbmalloc.so.2 +0 -0
  31. data/vendor/x86_64-linux/lib/libtbbmalloc_proxy.so.2 +0 -0
  32. data/vendor/x86_64-linux/licenses/sundials-license.txt +25 -63
  33. data/vendor/x86_64-linux/licenses/sundials-notice.txt +21 -0
  34. metadata +9 -4
  35. data/stan/win/prophet.stan +0 -175
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e24dad0631694318db703e420f657e964911071b73e03cd73a6fc4c2d6e16fc
4
- data.tar.gz: bcf2a53b3bcacf5461cd0b881bba0d026c7adee88200646f915074c9946711d3
3
+ metadata.gz: 2bcbd43f3750bc8c70fe28f2b0b42e88464724601daa754a9d60d8e8e354c701
4
+ data.tar.gz: c16f1ab7f2d48419543b54f326fc98ac1261c7e5ceaf7d3b0fd352b87a2fdcb3
5
5
  SHA512:
6
- metadata.gz: bdad3069aeaadaa9ac8d339fb6e877942470fd5c8e11652bce50029b0a6de13d0fe383f6a97a343e29138396dec4b1c159e5ee87d229073d2f3eb5c084aa5af2
7
- data.tar.gz: 1d54e502621ed4d34c818fe2e0e064578eae948957305300222892f4ee4750418e2471261596568d05795aea31bb4fe4639925da20a1f5db5bd20a0f0b35a66f
6
+ metadata.gz: e8b3cf363a665f063d7045b3c34c124021281e063e61ff99e7bd98ba774a0e40a2d379aeb53f521833724b11d5ff1c7934820b73095ad5384b70066fc20e5e36
7
+ data.tar.gz: 177f8eab90b9be0e5112c3d158ef9b522309143c559a97ffa206b7cc63a83f0eb70e75d7e1f8ab9640e57e403bd85d1469ecdb9137b0be8acc03c7ff09a91447
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.4.0 (2022-07-07)
2
+
3
+ - Added support for saving and loading models
4
+ - Updated holidays
5
+
1
6
  ## 0.3.2 (2022-05-15)
2
7
 
3
8
  - Added advanced API options to `forecast` and `anomalies` methods
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) Facebook, Inc. and its affiliates.
4
- Copyright (c) 2020 Andrew Kane
4
+ Copyright (c) 2020-2022 Andrew Kane
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining
7
7
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -80,6 +80,16 @@ Prophet.anomalies(series, growth: "logistic", weekly_seasonality: false)
80
80
 
81
81
  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.
82
82
 
83
+ - [Quick Start](#advanced-quick-start)
84
+ - [Plots](#plots)
85
+ - [Saturating Forecasts](#saturating-forecasts)
86
+ - [Trend Changepoints](#trend-changepoints)
87
+ - [Holidays and Special Events](#holidays-and-special-events)
88
+ - [Multiplicative Seasonality](#multiplicative-seasonality)
89
+ - [Uncertainty Intervals](#uncertainty-intervals)
90
+ - [Non-Daily Data](#non-daily-data)
91
+ - [Saving Models](#saving-models)
92
+
83
93
  ## Advanced Quick Start
84
94
 
85
95
  [Explanation](https://facebook.github.io/prophet/docs/quick_start.html)
@@ -298,6 +308,24 @@ future = m.make_future_dataframe(periods: 300, freq: "H")
298
308
  forecast = m.predict(future)
299
309
  ```
300
310
 
311
+ ## Saving Models
312
+
313
+ [Explanation](https://facebook.github.io/prophet/docs/additional_topics.html#saving-models)
314
+
315
+ Save a model
316
+
317
+ ```ruby
318
+ File.write("model.json", m.to_json)
319
+ ```
320
+
321
+ Load a model
322
+
323
+ ```ruby
324
+ m = Prophet.from_json(File.read("model.json"))
325
+ ```
326
+
327
+ Uses the same format as Python, so models can be saved and loaded in either language
328
+
301
329
  ## Resources
302
330
 
303
331
  - [Forecasting at Scale](https://peerj.com/preprints/3190.pdf)
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2017-2022 <maurizio.montel@gmail.com>
2
+ Copyright (c) 2014-2017 <ryanssdev@icloud.com>
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in
12
+ all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ Holidays from 1995 through 2044 are generated from [this script](https://github.com/facebook/prophet/blob/main/python/scripts/generate_holidays_file.py).
2
+
3
+ The data is primarily based on the Python [holidays](https://pypi.org/project/holidays/) package.