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

ENH: Basic anomaly detector #393

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return immediately when there is no deviation
  • Loading branch information
tibkiss committed Nov 19, 2020
commit b3c8c4b7b0ca3ec59422e57cb9c19d49f6c3ac04
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