dilated_rnn_losses
Pluggable point-loss functions for the DilatedRNN forecaster.
Self-contained (no dependency on other models' loss modules), matching the per-package convention used across the neural ports. Each loss has signature (pred, target) -> scalar and reduces by mean over all elements. Functions are module-level so they pickle cleanly when stored as the loss attribute of a fitted :class:chronax.models.dilated_rnn.DilatedRNN.
mae
chronax.dilated_rnn_losses.mae
Mean absolute error: mean(|pred - target|).
mae(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pred | jnp.ndarray | - | (undocumented) |
| target | jnp.ndarray | - | (undocumented) |
Returns: jnp.ndarray
mse
chronax.dilated_rnn_losses.mse
Mean squared error: mean((pred - target)**2).
mse(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pred | jnp.ndarray | - | (undocumented) |
| target | jnp.ndarray | - | (undocumented) |
Returns: jnp.ndarray
huber
chronax.dilated_rnn_losses.huber
Huber loss with delta = 1.0. Quadratic for |r| <= 1, linear outside.
huber(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pred | jnp.ndarray | - | (undocumented) |
| target | jnp.ndarray | - | (undocumented) |
Returns: jnp.ndarray
resolve
chronax.dilated_rnn_losses.resolve
Return a callable loss from either a registry string or a callable.
resolve(loss)
| Parameter | Type | Default | Description |
|---|---|---|---|
| loss | str | LossFn | - | (undocumented) |
Returns: LossFn
Raises:
* ValueError