Available kernels

When constructing a dcgp::kernel_set we can use the following names to add the corresponding kernels to the set.


Kernel name

Function

Definition

Basic operations

“sum”

addition

\(\sum_i x_i\)

“diff”

subtraction

\(x_1 - \sum_{i=2} x_i\)

“mul”

multiplication

\(\prod_i x_i\)

“div”

division

\(x_1 / \prod_{i=2} x_i\)

“pdiv”

protected division

\(x_1 / \prod_{i=2} x_i\) or 1 if NaN

Unary non linearities (ignoring all inputs after the first one)

“sin”

sine

\(\sin x_1\)

“cos”

cosine

\(\cos x_1\)

“log”

natural logarithm

\(\log x_1\)

“exp”

exponential

\(e^{x_1}\)

“gaussian”

gaussian

\(e^{-x_1^2}\)

“sqrt”

square root

\(\sqrt{x_1}\)

“psqrt”

protected square root

\(\sqrt{|x_1|}\)

Non linearities suitable also for dCGPANN

“sig”

sigmoid

\(\frac{1}{1 + e^{-\sum_i x_i}}\)

“tanh”

hyperbolic tangent

\(\tanh \left(\sum_i x_i\right)\)

“ReLu”

rectified linear unit

\(\sum_i x_i\) if positive, 0 otherwise

“ELU”

exp linear unit

\(\sum_i x_i\) if positive, \(e^{\sum_i x_i} - 1\) otherwise

“ISRU”

Inverse square root unit

\(\frac{\sum_i x_i}{\sqrt{1 + \left(\sum_i x_i\right)^2}}\)

“sum”

addition

\(\sum_i x_i\)

“sin_nu”

sine (non unary)

\(\sin(\sum_i x_i)\)

“cos_nu”

cosine (non unary)

\(\cos(\sum_i x_i)\)

“gaussian_nu”

gaussian (non unary)

\(e^{\sum_i x_i}\)

“abs”

absolute value

\(\vert\sum_i x_i\vert\)

“inv_sum”

inverse sum

\(- \sum_i x_i\)

“step”

step function

1 if positive, 0 otherwise