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.

Scaler

mlp_scaler.Scaler

(No summary provided.)

stats(self, x: jnp.ndarray, axis: int = 1) -> tuple[jnp.ndarray, jnp.ndarray]

(No summary provided.)

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

transform(self, x: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

inverse(self, z: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

IdentityScaler

mlp_scaler.IdentityScaler

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

stats(self, x: jnp.ndarray, axis: int = 1) -> tuple[jnp.ndarray, jnp.ndarray]

(No summary provided.)

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

transform(self, x: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

inverse(self, z: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

RobustScaler

mlp_scaler.RobustScaler

Median + MAD scaler with a 0.6745*std fallback when MAD is zero.

The shift is the window median and the scale is the median absolute deviation median(|x - median|). Where MAD is zero the scale falls back to 0.6745*std; exact zeros are then pinned to 1.0 and eps is added. Mirrors neuralforecast's robust_statistics.

stats(self, x: jnp.ndarray, axis: int = 1) -> tuple[jnp.ndarray, jnp.ndarray]

(No summary provided.)

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

transform(self, x: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

inverse(self, z: jnp.ndarray, shift: jnp.ndarray, scale: jnp.ndarray) -> jnp.ndarray

(No summary provided.)

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

resolve_scaler

mlp_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 (undocumented). Raises: ValueError.