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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6469e3c9b0f7d026678845025284f37f7c72f875e19a5f245d9bbc745d348a38
4
- data.tar.gz: f3be6a4488cf07a9b2b36f2ce8dd20e9c42aa4297b36b7c56d0ac16bbd6a28f2
3
+ metadata.gz: 4b32ff3ccea1dce9051e3e661ac61ed6c84e7f0f64189f169e11974033163f7e
4
+ data.tar.gz: 5dfb93a8cfea394e235fd6597b80e192e3e22a7bf7965d5e13e00e2d8ccc0ed8
5
5
  SHA512:
6
- metadata.gz: 6476dc943d7a23bf74e84a8fec345009b4587e1e514e9b8e22b32fdd02e44a0f60870eb918b5cb097cd47f1da3e9ad8481098f6800736eadc31fffd7db266f75
7
- data.tar.gz: e831ae81325d98e12a3b53bf3e68f87fdc953ad8cba1f22daca5cd375c822a9d39e5f192a4c40eeaf5c62c852955fce3b300680538988a7449069fc3de25fefb
6
+ metadata.gz: 47b944a25d3fa34e67d75ccd1cc558ab6777eef0f04c21e5af94328b4e5f03137e3ab29d005fef48cec064e0aeffea58e53997f851e6eee10a2b368c213807da
7
+ data.tar.gz: fb27bf59a2d69f5b5444f0b28836a8c6edf0a528199c56ae757cfaee87e69b2caa4f4ef15f703813994b35a6ce74b086895c71fb6737930e482fa7148ad1ca29
@@ -1,3 +1,8 @@
1
+ ## 0.2.2 (2020-07-26)
2
+
3
+ - Fixed error with constant series
4
+ - Fixed error with no changepoints
5
+
1
6
  ## 0.2.1 (2020-07-15)
2
7
 
3
8
  - Added `forecast` method
@@ -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
- @params["k"] = @params["k"] + @params["delta"].reshape(-1)
675
- @params["delta"] = Numo::DFloat.zeros(@params["delta"].shape).reshape(-1, 1)
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
@@ -1,3 +1,3 @@
1
1
  module Prophet
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-15 00:00:00.000000000 Z
11
+ date: 2020-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cmdstan