mae
chronax.tft_losses.mae
Mean absolute error.
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (undocumented)
mse
chronax.tft_losses.mse
Mean squared error.
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (undocumented)
huber
chronax.tft_losses.huber
Huber loss, delta = 1.0.
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (undocumented)
MultiQuantileLoss
chronax.tft_losses.MultiQuantileLoss
Multi-quantile (pinball) loss. __call__(pred[...,h,Q], target[...,h]). QL(y, y_hat, q) = q*(y-y_hat)+ + (1-q)*(y_hat-y)+, averaged over quantiles and all elements. Quantiles are sorted, must lie in (0, 1), and must include 0.5 (the median / "mean" head). Picklable (holds a plain tuple).
__init__(self, quantiles: Sequence[float] = (0.1, 0.5, 0.9))
(undocumented)
| Parameter | Type | Default | Description |
|---|---|---|---|
quantiles |
Sequence[float] |
(0.1, 0.5, 0.9) |
(undocumented) |
__call__(self, pred: jnp.ndarray, target: jnp.ndarray) -> jnp.ndarray
(undocumented)
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (undocumented)
outputsize_multiplier
chronax.tft_losses.outputsize_multiplier
Output-head width implied by loss (1 for point losses).
| Parameter | Type | Default | Description |
|---|---|---|---|
loss |
- | - | (undocumented) |
Returns: int (undocumented)
resolve
chronax.tft_losses.resolve
Return a callable loss from a registry string, a callable, or an MQ instance.
| Parameter | Type | Default | Description |
|---|---|---|---|
loss |
str | LossFn | MultiQuantileLoss |
- | (undocumented) |
Returns: (undocumented)