Skip to content

Commit

Permalink
Return immediately when there is no deviation
Browse files Browse the repository at this point in the history
  • Loading branch information
tibkiss committed Nov 19, 2020
1 parent f6c8176 commit 813def9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uda/anomaly/anomaly.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ func (a *Anomaly) detectByZSCore(epochs []int64, series []float64, columnNr int)
m := stat.Mean(series, nil)
s := stat.StdDev(series, nil)
if s == 0 {
s = 1
// no deviation
return
}

for i, x := range series {
Expand Down

0 comments on commit 813def9

Please sign in to comment.