ewma.go 99 Bytes
Newer Older
1 2 3 4 5
package decision

func ewma(old, new, alpha float64) float64 {
	return new*alpha + (1-alpha)*old
}