Skip to content

Abnormal percentage deviation #26

@GPrabhudas

Description

@GPrabhudas

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions