Anomaly detection techniques try to find the probability that a given set contains anomalous behavior, which can be unusual values or patterns.
The utility that is going to be developed in this section is called anomaly.go, and it is going to be presented in three parts. The utility uses probabilistic anomaly detection with the help of the Anomalyzer package and calculates the probability that the given set of numeric values contains anomalous behavior.
The first part of anomaly.go is as follows:
package main import ( "flag" "fmt" "math/rand" "strconv" "time" "github.com/lytics/anomalyzer" ) func random(min, max int) int { return rand.Intn(max-min) + min }
The second part of anomaly.go is as follows:
func main() { flag.Parse() if len(flag.Args...