You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/model.py in _handle_data(self, endog, exog, missing, hasconst, **kwargs)
98
99 def _handle_data(self, endog, exog, missing, hasconst, **kwargs):
--> 100 data = handle_data(endog, exog, missing, hasconst, **kwargs)
101 # kwargs arrays could have changed, easier to just attach here
102 for key in kwargs:
<array_function internals> in matrix_rank(*args, **kwargs)
~/anaconda3/envs/python3/lib/python3.6/site-packages/numpy/linalg/linalg.py in matrix_rank(M, tol, hermitian)
1902 S = svd(M, compute_uv=False, hermitian=hermitian)
1903 if tol is None:
-> 1904 tol = S.max(axis=-1, keepdims=True) * max(M.shape[-2:]) * finfo(S.dtype).eps
1905 else:
1906 tol = asarray(tol)[..., newaxis]
Error with simple dataset:
ValueError Traceback (most recent call last)
in
1 from causal_impact import CausalImpact
2 ci = CausalImpact(test, 120, n_seasons=7)
----> 3 ci.run(max_iter=1000)
4 ci.plot()
~/anaconda3/envs/python3/lib/python3.6/site-packages/causal_impact/causal_impact.py in run(self, max_iter, return_df)
69 exog=self.data.loc[:self._inter_index - 1, self._reg_cols()].values,
70 level='local linear trend',
---> 71 seasonal=self.n_seasons,
72 )
73 self._fit = self._model.fit(maxiter=max_iter)
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/tsa/statespace/structural.py in init(self, endog, level, trend, seasonal, freq_seasonal, cycle, autoregressive, exog, irregular, stochastic_level, stochastic_trend, stochastic_seasonal, stochastic_freq_seasonal, stochastic_cycle, damped_cycle, cycle_period_bounds, mle_regression, use_exact_diffuse, **kwargs)
571 # Setup the representation
572 super(UnobservedComponents, self).init(
--> 573 endog, k_states, k_posdef=k_posdef, exog=exog, **kwargs
574 )
575 self.setup()
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/tsa/statespace/mlemodel.py in init(self, endog, k_states, exog, dates, freq, **kwargs)
136 super(MLEModel, self).init(endog=endog, exog=exog,
137 dates=dates, freq=freq,
--> 138 missing='none')
139
140 # Store kwargs to recreate model
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/tsa/base/tsa_model.py in init(self, endog, exog, dates, freq, missing, **kwargs)
45 missing='none', **kwargs):
46 super(TimeSeriesModel, self).init(endog, exog, missing=missing,
---> 47 **kwargs)
48
49 # Date handling in indexes
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/model.py in init(self, endog, exog, **kwargs)
234
235 def init(self, endog, exog=None, **kwargs):
--> 236 super(LikelihoodModel, self).init(endog, exog, **kwargs)
237 self.initialize()
238
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/model.py in init(self, endog, exog, **kwargs)
75 hasconst = kwargs.pop('hasconst', None)
76 self.data = self._handle_data(endog, exog, missing, hasconst,
---> 77 **kwargs)
78 self.k_constant = self.data.k_constant
79 self.exog = self.data.exog
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/model.py in _handle_data(self, endog, exog, missing, hasconst, **kwargs)
98
99 def _handle_data(self, endog, exog, missing, hasconst, **kwargs):
--> 100 data = handle_data(endog, exog, missing, hasconst, **kwargs)
101 # kwargs arrays could have changed, easier to just attach here
102 for key in kwargs:
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/data.py in handle_data(endog, exog, missing, hasconst, **kwargs)
670 klass = handle_data_class_factory(endog, exog)
671 return klass(endog, exog=exog, missing=missing, hasconst=hasconst,
--> 672 **kwargs)
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/data.py in init(self, endog, exog, missing, hasconst, **kwargs)
85 self.const_idx = None
86 self.k_constant = 0
---> 87 self._handle_constant(hasconst)
88 self._check_integrity()
89 self._cache = {}
~/anaconda3/envs/python3/lib/python3.6/site-packages/statsmodels/base/data.py in _handle_constant(self, hasconst)
175 (np.ones(self.exog.shape[0]), self.exog))
176 rank_augm = np.linalg.matrix_rank(augmented_exog)
--> 177 rank_orig = np.linalg.matrix_rank(self.exog)
178 self.k_constant = int(rank_orig == rank_augm)
179 self.const_idx = None
<array_function internals> in matrix_rank(*args, **kwargs)
~/anaconda3/envs/python3/lib/python3.6/site-packages/numpy/linalg/linalg.py in matrix_rank(M, tol, hermitian)
1902 S = svd(M, compute_uv=False, hermitian=hermitian)
1903 if tol is None:
-> 1904 tol = S.max(axis=-1, keepdims=True) * max(M.shape[-2:]) * finfo(S.dtype).eps
1905 else:
1906 tol = asarray(tol)[..., newaxis]
~/anaconda3/envs/python3/lib/python3.6/site-packages/numpy/core/_methods.py in _amax(a, axis, out, keepdims, initial, where)
37 def _amax(a, axis=None, out=None, keepdims=False,
38 initial=_NoValue, where=True):
---> 39 return umr_maximum(a, axis, None, out, keepdims, initial, where)
40
41 def _amin(a, axis=None, out=None, keepdims=False,
ValueError: zero-size array to reduction operation maximum which has no identity
The text was updated successfully, but these errors were encountered: