Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/axect/numeric

Go Package for Numerical Calculations
https://github.com/axect/numeric

array go-packages numerical-calculations statistics

Last synced: about 1 month ago
JSON representation

Go Package for Numerical Calculations

Awesome Lists containing this project

README

        

# Go Numeric

Go Package for Numerical Calculations & Statistics

## 0. Notation

* Vector is just []float64
* Matrix is just [][]float64

For example
```go
package main

import (
"github.com/Axect/Numeric/array"
"github.com/Axect/Numeric/stats"
)

func main() {
A := array.Create(1, 1, 100) // [1, 2, 3, 4, ... , 100]
m := stats.Mean(A) // Mean
v := stats.Var(A) // Variance

B := array.Create(-100, 1, -1)
array.Write([]Vector{A, B}, "test.csv") // Write to csvfile
}
```

## 1. Array

Array has some vector operations.

* Create (Vector)
* Zeros (Matrix)
* Eyes (Matrix)
* MatrixForm
* Float2Int
* Transpose (Matrix)
* Det
* Minor
* Inverse
* Sum
* Pow
* Sub
* Add
* Mul
* Inner
* AddConst (Vector, float64)
* SubConst
* DivisionConst
* Float2Int ([]float64 -> []int64)
* Write ([]Vector -> csv)

## 2. Stats

Stats has Probability & Statistics functions

* Factorial
* Perm
* Comb
* Homonomial
* Mean
* Var
* Std
* Cov
* CovMatrix
* Cor (Correlation Coefficient)
* Moment
* NormalDist
* BinormialDist