prophet-rb 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/prophet/forecaster.rb +6 -4
- data/lib/prophet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b32ff3ccea1dce9051e3e661ac61ed6c84e7f0f64189f169e11974033163f7e
|
4
|
+
data.tar.gz: 5dfb93a8cfea394e235fd6597b80e192e3e22a7bf7965d5e13e00e2d8ccc0ed8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b944a25d3fa34e67d75ccd1cc558ab6777eef0f04c21e5af94328b4e5f03137e3ab29d005fef48cec064e0aeffea58e53997f851e6eee10a2b368c213807da
|
7
|
+
data.tar.gz: fb27bf59a2d69f5b5444f0b28836a8c6edf0a528199c56ae757cfaee87e69b2caa4f4ef15f703813994b35a6ce74b086895c71fb6737930e482fa7148ad1ca29
|
data/CHANGELOG.md
CHANGED
data/lib/prophet/forecaster.rb
CHANGED
@@ -659,8 +659,8 @@ module Prophet
|
|
659
659
|
# Nothing to fit.
|
660
660
|
@params = stan_init
|
661
661
|
@params["sigma_obs"] = 1e-9
|
662
|
-
@params.each do |par|
|
663
|
-
@params[par] = Numo::NArray.asarray(@params[par])
|
662
|
+
@params.each do |par, _|
|
663
|
+
@params[par] = Numo::NArray.asarray([@params[par]])
|
664
664
|
end
|
665
665
|
elsif @mcmc_samples > 0
|
666
666
|
@params = @stan_backend.sampling(stan_init, dat, @mcmc_samples, **kwargs)
|
@@ -671,8 +671,10 @@ module Prophet
|
|
671
671
|
# If no changepoints were requested, replace delta with 0s
|
672
672
|
if @changepoints.size == 0
|
673
673
|
# Fold delta into the base rate k
|
674
|
-
|
675
|
-
|
674
|
+
# Numo doesn't support -1 with reshape
|
675
|
+
negative_one = @params["delta"].shape.inject(&:*)
|
676
|
+
@params["k"] = @params["k"] + @params["delta"].reshape(negative_one)
|
677
|
+
@params["delta"] = Numo::DFloat.zeros(@params["delta"].shape).reshape(negative_one, 1)
|
676
678
|
end
|
677
679
|
|
678
680
|
self
|
data/lib/prophet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prophet-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmdstan
|