A shape is a sequence of positive integers.
The length of shape is called the rank of the shape.
The product of all integers in the sequence is called the dimension, or dim for short, of the shape.
The rank of a shape can be 0, the dim of 0-rank shape is 1.
Note:
The set of all shapes has countable infinite cardinality.
The set of all k-rank shape form a free semi-group over \mathbb N^\ast.
tensor
Let R be a commutative ring, a tensor of shape s = (k, m, n, ... ) is isomorphic to (((R^...)^n)^m)^k.
The rank and dim of a tensor is defined as the rank and dim of its shape.
We often omit R when speaking of a tensor.
Note:
A 0-rank tensor is called a scalar, the set scalars is isomorphic to R.
A 1-rank tensor is called a vector.
A 2-rank tensor is called a matrix.
function
Function is a meta concept that will not be defined here.
A function can be written as
F : X_1, \cdots, X_n \to Y
F : x_1, \cdots, x_n \to y
where n is called the arity of F, and x_1, \cdots, x_n are called the parameters, or arguments of F.
A function can be curried as:
F : X_1 -> X_2 \cdots -> X_n -> Y
or partially currized as:
F: (X_1, \cdots, Xk) -> (X{k + 1}, \cdots, X_n) -> Y
operator
An operator is a tensor function.
An operator of arity n is a function that takes n tensors and output 1 tensor.
The signature of an n-arity operator is a sequence of n + 1 integers, representing the ranks of the output tensor and the input tensors.
Note:
Operator of 0-arity is called an initializer
Operator of 1-arity is called unary operator
Operator of 2-arity is called binary operator
layer
A layer is a unary operator.
Note:
A layer can be obtained by binding k - 1 parameters to an k-arity operator.
var and covar
A variable, or var is a free parameter.
A covariable, or covar is a bounded parameter.
model
A model is a composed operator of many operators or layers.
The arity of a model is the number of bounded parameters.
Note:
A model is called a classification model if its output tensor is a probability vector.
agent
An agent is an entity of intelligent, which can percept, learn and react.
An agent will be represented by a Lipschitz Transducer,
a continuous extension of Finite State Transducer (FST).
(more details: TBD)
An agent shall be implemented as a model.
DRAFT
shape
A shape is a sequence of positive integers. The length of shape is called the rank of the shape. The product of all integers in the sequence is called the dimension, or dim for short, of the shape. The rank of a shape can be 0, the dim of 0-rank shape is 1.
Note:
tensor
Let R be a commutative ring, a tensor of shape s = (k, m, n, ... ) is isomorphic to (((R^...)^n)^m)^k. The rank and dim of a tensor is defined as the rank and dim of its shape. We often omit R when speaking of a tensor.
Note:
function
Function is a meta concept that will not be defined here. A function can be written as F : X_1, \cdots, X_n \to Y F : x_1, \cdots, x_n \to y where n is called the arity of F, and x_1, \cdots, x_n are called the parameters, or arguments of F.
A function can be curried as: F : X_1 -> X_2 \cdots -> X_n -> Y or partially currized as: F: (X_1, \cdots, Xk) -> (X{k + 1}, \cdots, X_n) -> Y
operator
An operator is a tensor function. An operator of arity n is a function that takes n tensors and output 1 tensor. The signature of an n-arity operator is a sequence of n + 1 integers, representing the ranks of the output tensor and the input tensors.
Note:
layer
A layer is a unary operator.
Note:
var and covar
A variable, or var is a free parameter. A covariable, or covar is a bounded parameter.
model
A model is a composed operator of many operators or layers. The arity of a model is the number of bounded parameters.
Note:
agent
An agent is an entity of intelligent, which can percept, learn and react.
An agent will be represented by a Lipschitz Transducer, a continuous extension of Finite State Transducer (FST). (more details: TBD) An agent shall be implemented as a model.