Example #1
0
// The first option maps the difference between the value and the mean to a binary enum
func generateMeanRuns(ds *RandGenerator.Dataset) []bool {
	runs := make([]bool, ds.Len())

	mean := ds.Mean()

	for i := 0; int(i) < int(ds.Len()); i++ {
		point := ds.Get(i)
		runs[i] = math.Signbit(point - mean)
	}
	return runs
}