Categorygithub.com/axect/numeric
repository
0.0.0-20181118023354-e68add37ba44
Repository: https://github.com/axect/numeric.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Go Numeric

Go Package for Numerical Calculations & Statistics

0. Notation

  • Vector is just []float64
  • Matrix is just [][]float64

For example

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