Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsubaki/welford
Welford algorithm for Go
https://github.com/itsubaki/welford
kahan welford
Last synced: 20 days ago
JSON representation
Welford algorithm for Go
- Host: GitHub
- URL: https://github.com/itsubaki/welford
- Owner: itsubaki
- License: mit
- Created: 2023-01-15T02:50:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-16T04:19:35.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T17:01:39.059Z (7 months ago)
- Topics: kahan, welford
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# welford
* Welford algorithm for Go
```go
w := welford.New()
w.Add(1)
w.Add(2, 3, 4, 5)
w.Add([]float64{6, 7, 8, 9, 10}...)fmt.Println(w.N())
fmt.Println(w.Mean())
fmt.Println(w.Var())
fmt.Println(w.Stddev())// Output:
// 10
// 5.5
// 9.166666666666666
// 3.0276503540974917
```