3 ms·
Gonum has many of these capabilities, but with a slightly different mentality (gonum has weights and sticks to pure []float64 while this defines types and metho
by howeman 11y ago
Gonum has many of these capabilities, but with a slightly different mentality (gonum has weights and sticks to pure []float64 while this defines types and methods, i.e. Coordinate, Float64Data)
gonum/floats for max, min, round, sum, etc.
gonum/stat for mean, std, variance, etc.
gonum/stat/sample for sampling without replacement
- howeman 11y agoIf you're interested in developing more stats stuff, we'd love to have you as part of the effort. gonum/stat/dist in particular needs a lot more functionality.
- fogleman 11y agoWhy are these all separate repos? And is there any centralized documentation? Can't find any.
- howeman 11y agoThey are separate repos because they have different mentalities. Stat is basic statistics for a (weighted) set of values. Floats is closer to dealing with properties of a vector (norm, distance, etc.). Sample has sophisticated sampling from distributions (metropolis hastings, etc.). gonum/stat/dist has sampling distributions themselves. Documentation can be found in godoc, i.e. godoc.org/github.com/gonum/stat, godoc.org/github.com/gonum/matrix/mat64, etc.
- anonfunction 11y agoStats also works fine with pure []float64 data. The types allow for a very clean API for working with data and statistics. You can compare using functions[1] or methods[2] in /examples. I started with only []float64 but wanted to allow stuff like this: func getData() []float64 { // Do stuff to get the data and // store it in var data []float64 return data } var d Float64Data = getData() fmt.Println(d.Max()) 1. https://github.com/montanaflynn/stats/blob/master/examples/main.go https://github.com/montanaflynn/stats/blob/master/examples/m... 2. https://github.com/montanaflynn/stats/blob/master/examples/methods.go https://github.com/montanaflynn/stats/blob/master/examples/m...