Esc
Ask AIAnswers may be inaccurate; check the linked pages.Esc
Ask anything about these docs, like how to get started or what a function does.

timemixer_losses

chronax.timemixer_losses

Pluggable point-loss functions for the TimeMixer forecaster.

mae

chronax.timemixer_losses.mae(pred, target)

Mean absolute error: mean(|pred - target|).

Parameter Type Default Description
pred jnp.ndarray - (undocumented)
target jnp.ndarray - (undocumented)

Returns: jnp.ndarray

mse

chronax.timemixer_losses.mse(pred, target)

Mean squared error: mean((pred - target)**2).

Parameter Type Default Description
pred jnp.ndarray - (undocumented)
target jnp.ndarray - (undocumented)

Returns: jnp.ndarray

huber

chronax.timemixer_losses.huber(pred, target)

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.timemixer_losses.resolve(loss)

Return a callable loss from either a registry string or a callable.

Parameter Type Default Description
loss str | LossFn - (undocumented)

Returns: LossFn