ArrayExtensions
a += α * b
public static Array<float> Add(this Array<float> a, Array<float> b, float alpha = 1, Array<float> result = null)
public static Array<int> Argmax(this Array<float> a, int axis, bool keepDims = false, Array<int> result = null)
see NumPy doc
public static Array<int> Argmin(this Array<float> a, int axis, bool keepDims = false, Array<int> result = null)
public static Array<float> Combine(this Array<float> t, Array<float> x, Array<float> y, Array<float> result = null, float alpha = 1, float beta = 0)
Uses the tensor to combine x and y.
It's a shortcut for t.dot(x).dot(y) = y.dot(t).dot(x)
result = alpha * (T . x) . y + beta * result = alpha * (y . T) . x + beta * result
public static Array<float> Combine10(this Array<float> t, Array<float> y, Array<float> z, Array<float> result = null, float alpha = 1, float beta = 0)
A modified Combine version.
result = alpha * z . (y . T) + beta * result
public static Array<float> Combine20(this Array<float> t, Array<float> x, Array<float> z, Array<float> result = null, float alpha = 1, float beta = 0)
A modified Combine version.
result = alpha * z . (T . x) + beta * result
public static Array<float> Combine21(this Array<float> t, Array<float> x, Array<float> y, Array<float> result = null, float alpha = 1, float beta = 0)
The basic Combine version
result = alpha * (T . x) . y + beta * result
public static Array<float> Dot(this Array<float> a, Array<float> b, Array<float> result = null, float alpha = 1, float beta = 0, bool transA = false, bool transB = false)
Matrix multiplication.
Returns: alpha * dot(a, b) + beta * result
Ie with default value: dot(a, b)
result[i] = alpha / a[i]
public static Array<float> Max(this Array<float> a, int axis, bool keepDims = false, Array<float> result = null)
public static Array<float> Min(this Array<float> a, int axis, bool keepDims = false, Array<float> result = null)
public static Array<float> Outer(this Array<float> a, Array<float> b, Array<float> result = null, float alpha = 1, float beta = 0)
Compute the outer product of two vectors: result[i, j] = alpha * a[i] * b[j] + beta * result[i, j]
public static Array<float> Sub(this Array<float> a, Array<float> b, float alpha = 1, Array<float> result = null)
public static Array<float> Sum(this Array<float> a, int axis, Func<float, float> f, Array<float> result = null, bool keepDims = false)
public static Array<float> Sum(this Array<float> a, int axis, Array<float> result = null, float alpha = 1, float beta = 0, bool keepDims = false)
a.Sum(axis = 1)[i] = α * Σ_j a[i, j]
public static Array<float> TensorDot(this Array<float> a, Array<float> b, Array<float> result = null, float beta = 1)
Tensor dot on axis = 0
public static Array<float> TensorDotLeft(this Array<float> vec, Array<float> mat, Array<float> result = null, float beta = 1)
public static Array<float> TensorDotRight(this Array<float> mat, Array<float> vec, Array<float> result = null, float beta = 1)