Available kernels ---------------------------------- When constructing a :cpp:class:`dcgp::kernel_set` we can use the following names to add the corresponding kernels to the set. --------------------------------------------------------------------------- .. cssclass:: table-bordered table-striped +----------------+------------------------+---------------------------------------------------------------------------------------+ |Kernel name | Function | Definition | +================+========================+=======================================================================================+ | **Basic operations** | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sum" |addition | :math:`\sum_i x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"diff" |subtraction | :math:`x_1 - \sum_{i=2} x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"mul" |multiplication | :math:`\prod_i x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"div" |division | :math:`x_1 / \prod_{i=2} x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"pdiv" |protected division | :math:`x_1 / \prod_{i=2} x_i` or 1 if NaN | +----------------+------------------------+---------------------------------------------------------------------------------------+ | **Unary non linearities (ignoring all inputs after the first one)** | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sin" |sine | :math:`\sin x_1` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"cos" |cosine | :math:`\cos x_1` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"log" |natural logarithm | :math:`\log x_1` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"exp" |exponential | :math:`e^{x_1}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"gaussian" |gaussian | :math:`e^{-x_1^2}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sqrt" |square root | :math:`\sqrt{x_1}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"psqrt" |protected square root | :math:`\sqrt{|x_1|}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ | **Non linearities suitable also for dCGPANN** | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sig" |sigmoid | :math:`\frac{1}{1 + e^{-\sum_i x_i}}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"tanh" |hyperbolic tangent | :math:`\tanh \left(\sum_i x_i\right)` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"ReLu" |rectified linear unit | :math:`\sum_i x_i` if positive, 0 otherwise | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"ELU" |exp linear unit | :math:`\sum_i x_i` if positive, :math:`e^{\sum_i x_i} - 1` otherwise | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"ISRU" |Inverse square root unit| :math:`\frac{\sum_i x_i}{\sqrt{1 + \left(\sum_i x_i\right)^2}}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sum" |addition | :math:`\sum_i x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"sin_nu" |sine (non unary) | :math:`\sin(\sum_i x_i)` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"cos_nu" |cosine (non unary) | :math:`\cos(\sum_i x_i)` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"gaussian_nu" |gaussian (non unary) | :math:`e^{\sum_i x_i}` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"abs" |absolute value | :math:`\vert\sum_i x_i\vert` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"inv_sum" |inverse sum | :math:`- \sum_i x_i` | +----------------+------------------------+---------------------------------------------------------------------------------------+ |"step" |step function | 1 if positive, 0 otherwise | +----------------+------------------------+---------------------------------------------------------------------------------------+