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

Tutorial 202 detection BOCPDetector parameter error #321

Open
yannmean opened this issue Jul 12, 2023 · 1 comment
Open

Tutorial 202 detection BOCPDetector parameter error #321

yannmean opened this issue Jul 12, 2023 · 1 comment

Comments

@yannmean
Copy link

Hi, there!

We are trying to run through tutorial 202, however, encountered the following error. Could you please kindly help? thanks!

Exception Traceback (most recent call last)
Cell In[37], line 1
----> 1 changepoints = bocpd_detector.detector(
2 model=BOCPDModelType.NORMAL_KNOWN_MODEL, # this is the default choice
3 choose_priors=True,
4 changepoint_prior=0.01
5 )

BOCPDetector.detector(self, model, model_parameters, lag, choose_priors, changepoint_prior, threshold, debug, agg_cp)
364 assert isinstance(
365 model_parameters, self.parameter_type[model]
366 ), f"Expected parameter type {self.parameter_type[model]}, but got {model_parameters}"
368 if choose_priors:
--> 369 changepoint_prior, model_parameters = self._choose_priors(
370 model, model_parameters
371 )
373 if getattr(model_parameters, "data", 0) is None:
374 model_parameters.data = self.data
...
394 if len(data) > 0
395 else cls.data_constructor()
396 )

Exception: []

@yannmean
Copy link
Author

yannmean commented Jul 12, 2023

tried several other ways... I just don't understand it anymore...

I did the following:

`from kats.detectors.bocpd import BOCPDetector, BOCPDModelType, NormalKnownParameters'

'bocpd_detector = BOCPDetector(ts_bocpd)'

'changepoints = bocpd_detector.detector(
model=BOCPDModelType.NORMAL_KNOWN_MODEL, # this is the default choice
model_parameters=NormalKnownParameters
)`

But the error says: AssertionError: Expected parameter type <class 'kats.detectors.bocpd.NormalKnownParameters'>, but got <class 'kats.detectors.bocpd.NormalKnownParameters'>

I just don't see the difference between <class 'kats.detectors.bocpd.NormalKnownParameters'> and the latter <class 'kats.detectors.bocpd.NormalKnownParameters'>

Please, anyone?

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

1 participant