chronax.bitcn_losses
Pluggable point-loss functions for the BiTCN forecaster. Self-contained (no dependency on other models' loss modules). 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 BiTCN. NF BiTCN defaults to MAE().
mae
chronax.bitcn_losses.mae
Mean absolute error: mean(|pred - target|).
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray
mse
chronax.bitcn_losses.mse
Mean squared error: mean((pred - target)**2).
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray
huber
chronax.bitcn_losses.huber
Huber loss with delta = 1.0. Quadratic for |r| <= 1, linear outside.
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray
resolve
chronax.bitcn_losses.resolve
Return a callable loss from either a registry string or a callable.
| Parameter | Type | Default | Description |
|---|---|---|---|
loss |
str | LossFn |
- | (undocumented) |
Returns: LossFn