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.

dlinear_scaler

Per-window scalers for DLinear: identity (NF default) and robust (median/MAD).

Scaler

chronax.dlinear_scaler.Scaler

A protocol defining the interface for per-window scalers.

stats(self, x, axis=1)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
axis int 1 (undocumented)

Returns: tuple[jnp.ndarray, jnp.ndarray] (shift, scale)

transform(self, x, shift, scale)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

inverse(self, z, shift, scale)

Parameter Type Default Description
z jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

IdentityScaler

chronax.dlinear_scaler.IdentityScaler

No-op scaler (shift=0, scale=1). Matches neuralforecast's scaler_type='identity'.

stats(self, x, axis=1)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
axis int 1 (undocumented)

Returns: tuple[jnp.ndarray, jnp.ndarray] (shift, scale)

transform(self, x, shift, scale)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

inverse(self, z, shift, scale)

Parameter Type Default Description
z jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

RobustScaler

chronax.dlinear_scaler.RobustScaler

Median + MAD scaler with 0.6745*std fallback when MAD=0.

stats(self, x, axis=1)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
axis int 1 (undocumented)

Returns: tuple[jnp.ndarray, jnp.ndarray] (median, scale)

transform(self, x, shift, scale)

Parameter Type Default Description
x jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

inverse(self, z, shift, scale)

Parameter Type Default Description
z jnp.ndarray - (undocumented)
shift jnp.ndarray - (undocumented)
scale jnp.ndarray - (undocumented)

Returns: jnp.ndarray

resolve_scaler

chronax.dlinear_scaler.resolve_scaler

Resolve a scaler from a name ('identity'/'robust') or a Scaler instance.

Parameter Type Default Description
scaler str \| Scaler - (undocumented)

Returns: Scaler Raises: ValueError (if an unknown scaler name is provided)