dynax.util
Functions
|
Append trailing size-1 axes to arr until it has the same ndim as target. |
|
Convert a dimension specifier to a shape tuple. |
|
|
|
Compute mean-squared error. |
|
Create a periodic bandpassed multitone signal. |
|
Compute normalized mean-squared error. |
|
Compute normalized root mean-squared error. |
|
Return a pretty-formatted string representation of an equinox pytree. |
|
Evaluate fun and its forward-mode Jacobian at x. |
|
Evaluate fun and its reverse-mode Jacobian at x. |
- dynax.util.value_and_jacfwd(fun, x)[source]
Evaluate fun and its forward-mode Jacobian at x.
- Parameters:
fun (
Callable) – Function whose Jacobian is to be computed.x (
Array) – Point at which function and Jacobian is evaluated.
- Returns:
tuple[Array,Array] – Tuple (y, jac) of the function value and Jacobian matrix at x.
From this issue.
- dynax.util.value_and_jacrev(fun, x)[source]
Evaluate fun and its reverse-mode Jacobian at x.
- Parameters:
fun (
Callable) – Function whose Jacobian is to be computed.x (
Array) – Point at which function and Jacobian is evaluated.
- Returns:
tuple[Array,Array] – Tuple (y, jac) of the function value and Jacobian matrix at x.
From this issue.
- dynax.util.nmse(target, prediction, axis=0)[source]
Compute normalized mean-squared error.
- Return type:
Array
- dynax.util.nrmse(target, prediction, axis=0)[source]
Compute normalized root mean-squared error.
- Return type:
Array
- dynax.util.pretty(tree)[source]
Return a pretty-formatted string representation of an equinox pytree.
- dynax.util.broadcast_right(arr, target)[source]
Append trailing size-1 axes to arr until it has the same ndim as target.
- dynax.util.multitone(length, num_tones, first_tone=0)[source]
Create a periodic bandpassed multitone signal.
Has flat spectrum and crest factor <= 2.
- Return type:
Array
- From: S. Boyd, “Multitone Signals with Low Crest Factor”
IEEE Transactions on Circuits and Systems, CAS-33(10):1018-1022, October 1986