package datascience // OutlierResult is a sum type representing whether a data point is normal or an outlier. type OutlierResult interface{ outlierResult() } // Normal indicates the data point is within expected range. type Normal struct { Index int Value float64 } // Outlier indicates the data point is anomalous. type Outlier struct { Index int Value float64 ZScore float64 } func (Normal) outlierResult() {} func (Outlier) outlierResult() {}