e3x.nn.functions.mappings.reciprocal_mapping

e3x.nn.functions.mappings.reciprocal_mapping(x, kind='shifted')[source]

Reciprocal mapping function.

Computes the function (when kind = 'shifted')

\[\mathrm{reciprocal\_mapping}(x) = \frac{1}{x+1}\]

which is \(1\) for \(x = 0\) and \(0\) for \(x \to \infty\), or (when kind = 'damped')

\[\mathrm{reciprocal\_mapping}(x) = \frac{1-e^{-x}}{x}\]

which is \(1\) for \(x = 0\) and \(\sim \frac{1}{x}\) for \(x \gg 1\), or (when kind = 'cuspless')

\[\mathrm{reciprocal\_mapping}(x) = \frac{1}{x+e^{-x}}\]

which is similar to kind = 'damped', but has no cusp at \(x = 0\).

../_images/e3x.nn.functions.mappings.reciprocal_mapping_0_0.svg
Parameters:
  • x (<class 'Float[Array, '...']'>) – Input array.

  • kind ({'shifted', 'damped', 'cuspless'}, default: 'shifted') – Which kind of mapping is used.

Return type:

<class 'Float[Array, '...']'>

Returns:

The function value.