Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forecast_recurrent error #3

Open
RageAgainstTheMachine101 opened this issue Sep 9, 2018 · 2 comments
Open

forecast_recurrent error #3

RageAgainstTheMachine101 opened this issue Sep 9, 2018 · 2 comments

Comments

@RageAgainstTheMachine101
Copy link

RageAgainstTheMachine101 commented Sep 9, 2018

Hello!
I like your lib! But I've got some errors:

AttributeError Traceback (most recent call last)
~/Documents/notebooks/vk/SSA/mySSA.py in forecast_recurrent(self, steps_ahead, singular_values, plot, return_df, **plotargs)
206 try:
--> 207 self.X_com_hat
208 except(AttributeError):

AttributeError: 'mySSA' object has no attribute 'X_com_hat'

During handling of the above exception, another exception occurred:

KeyError Traceback (most recent call last)
~/Documents/notebooks/vk/SSA/mySSA.py in _forecast_prep(self, singular_values)
185 for i in singular_values:
--> 186 self.forecast_orthonormal_base[i] = self.orthonormal_base[i]
187 except:

KeyError: 3

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last)
in ()
----> 1 ssa.forecast_recurrent(steps_ahead=ssa.ts.shape[0], singular_values=streams10, plot=True)

~/Documents/notebooks/vk/SSA/mySSA.py in forecast_recurrent(self, steps_ahead, singular_values, plot, return_df, **plotargs)
207 self.X_com_hat
208 except(AttributeError):
--> 209 self._forecast_prep(singular_values)
210 self.ts_forecast = np.array(self.ts_v[0])
211 for i in range(1, self.ts_N+steps_ahead):

~/Documents/notebooks/vk/SSA/mySSA.py in _forecast_prep(self, singular_values)
189 self.forecast_orthonormal_base[0] = self.orthonormal_base[0]
190 else:
--> 191 raise('Please pass in a list/array of singular value indices to use for forecast')
192 else:
193 self.forecast_orthonormal_base = self.orthonormal_base

TypeError: exceptions must derive from BaseException

@arvinnick
Copy link

Hi
I had your issue. I found that the initial list for singular values parameter is "stream10" which is 0 to 10. But it should be a list consisting of your produced signals (the X axis of the first bar chart).
I have some other questions as well. Why this list only has zero for me?!:)

@vic1309
Copy link

vic1309 commented Jun 19, 2022

Hey! Did you manage to solve this issue?

The issue is related to the number of contributions. In the example, there are 15 arrays while, at least in my dataset, only 1 component is present. However, I'm not sure why this happens. Is this related to how 'smooth' is your dataset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants