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

Zeros in the log function for online detection #14

Open
aimeeh0527 opened this issue Feb 20, 2018 · 5 comments
Open

Zeros in the log function for online detection #14

aimeeh0527 opened this issue Feb 20, 2018 · 5 comments

Comments

@aimeeh0527
Copy link

I ran the entire sample code and got an error on the log function for online detection. It says "divide by zero encountered in log". I constantly got this error for the random time series or my own time series data. I am wondering why there are zeros and how to avoid them. Could you please take a look when you get some time? Thank you so much!

@hildensia
Copy link
Owner

Can you explain a bit more in detail what you tried. I just run the notebook without any problems.

@aimeeh0527
Copy link
Author

Thanks for the reply! I ran the code in Python 3, and here is the RuntimeWarning I got from the online detection:
image

Then the graphs turned out a bit weird. The second graph does not have an all-black background (I believe that indicates a probability of 0), and the third graph seems missing one or two changepoints.
image

For the offline detection everything went well. For the online one I am sure I didn't make any change on the code so I am confused why I got different results from yours. Thanks for looking into my problem!

@hildensia
Copy link
Owner

Sorry I'm quite busy. I promise to look into it at some point.

@aimeeh0527
Copy link
Author

No worries! This error had almost no effect on the results, only on the graph. And I think I almost figured out how to fix it in the numpy arrays. Thanks a ton for your time!

@hedgeon
Copy link

hedgeon commented Jan 8, 2019

I have exactly the same problem when I run the code

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