Skip to content

In statistics, a moving average is a calculation to analyze data points by creating a series of averages of different subsets of the full data set. #golang

License

Notifications You must be signed in to change notification settings

SimonWaldherr/movingavg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

movingavg

Go Report Card

Moving average implementation for Go. Moving average is used, among other things, to smooth out outliers in measurement results.

usage

package main

import (
    "simonwaldherr.de/go/movingavg"
    "fmt"
)

func main() {
    ma := movingavg.New(3)
    ma.Add(1)
    ma.Add(2)
    ma.Add(3)
    ma.Add(5)
    fmt.Printf("Avg: %d", ma.Arithmetic())
}

About

In statistics, a moving average is a calculation to analyze data points by creating a series of averages of different subsets of the full data set. #golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages