Documentation ¶
Index ¶
- func AddBias(m mat64.Matrix) *mat64.Dense
- func AddMx(f float64) func(int, int, float64) float64
- func ColSums(m *mat64.Dense) []float64
- func ColsMax(m *mat64.Dense) []float64
- func ExpMx(i, j int, x float64) float64
- func LogMx(i, j int, x float64) float64
- func MakeLabelsMx(labels *mat64.Vector, expLabels int) (*mat64.Dense, error)
- func MakeRandMx(rows, cols int, min, max float64) (*mat64.Dense, error)
- func Mx2Vec(m *mat64.Dense, byRow bool) []float64
- func Ones(rows, cols int) *mat64.Dense
- func PowMx(f float64) func(int, int, float64) float64
- func ReluGradMx(i, j int, x float64) float64
- func ReluMx(i, j int, x float64) float64
- func RowSums(m *mat64.Dense) []float64
- func RowsMax(m *mat64.Dense) []float64
- func SetMx2Vec(mx *mat64.Dense, vec []float64, byRow bool) (err error)
- func Sigmoid(x float64) float64
- func SigmoidGrad(x float64) float64
- func SigmoidGradMx(i, j int, x float64) float64
- func SigmoidMx(i, j int, x float64) float64
- func SubtrMx(f float64) func(int, int, float64) float64
- func TanhGradMx(i, j int, x float64) float64
- func TanhMx(i, j int, x float64) float64
- func TanhOutMx(i, j int, x float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBias ¶
AddBias adds a bias unit (either a vector or a single unit) to mat64.Matrix and returns the new augmented matrix without modifying the original one
func ColSums ¶
ColSums returns a slice of sums of all elemnts in each matrix column It returns nil if passed in matrix is nil or has zero elements
func ColsMax ¶
ColsMax returns a slice of max values per each matrix column It returns nil if passed in matrix is nil or has zero elements
func MakeLabelsMx ¶
MakeLabelsMx creates a 1-of-N matrix from the supplied vector of labels Labels matrix has the following dimensions: labels.Len() x expLabels It does not modify the supplied matrix of labels. It returns error if the number of labels is negative integer or if one of the labels is non-positive or is greater than number of labels
func MakeRandMx ¶
MakeRandMx creates a new matrix with of size rows x cols that is initialized to random number uniformly distributed in interval (min, max)
func Mx2Vec ¶
Mx2Vec unrolls all elements of matrix into a slice and returns it. Matrix elements can be unrolled either by row or by a column.
func ReluGradMx ¶
ReluGradMx provides Relu a "derlivation" used in backpropagation algorithm
func RowSums ¶
RowSums returns a slice of sums of all elemnts in each matrix row It returns nil if passed in matrix is nil or has zero elements
func RowsMax ¶
RowsMax returns a slice of max values per each matrix row It returns nil if passed in matrix is nil or has zero elements
func SetMx2Vec ¶
SetMx2Vec sets all elements of a matrix to values stored in a slice passed in as a parameter. It fails with error if number of elements of the matrix is bigger than number of elements of the slice.
func SigmoidGrad ¶
SigmoidGrad provides sigmoid derivation used in backprop algorithm
func SigmoidGradMx ¶
SigmoidGradMx allows to apply Sigmoidd derivation func to all matrix elements
func TanhGradMx ¶
TanhGradMx provides Tanh derivation used in backpropagation algorithm
Types ¶
This section is empty.