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

Abnormal percentage deviation #26

Open
GPrabhudas opened this issue Dec 11, 2019 · 0 comments
Open

Abnormal percentage deviation #26

GPrabhudas opened this issue Dec 11, 2019 · 0 comments

Comments

@GPrabhudas
Copy link

GPrabhudas commented Dec 11, 2019

FYI I'm referring to : https://github.com/yahoo/sherlock/blob/master/src/main/java/com/yahoo/sherlock/model/AnomalyReport.java#L272

int percentageDeviation = (int) (((interval.actualVal - interval.expectedVal) / interval.expectedVal) * 100);

Whenever the interval.expectedVal = 0.0f then, no matter what is the value of interval.actualVal we always get
percentageDeviation = 2147483647; // max value that can fit in int(32-bit signed integer)

Is it the expected behaviour or do we need to handle this case ?

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