sinergym.utils.wrappers.NormalizeObservation

class sinergym.utils.wrappers.NormalizeObservation(*args: Any, **kwargs: Any)
__init__(env: Any, ranges: Dict[str, Sequence[Any]])

Observations normalized to range [0, 1].

Parameters:
  • env (Any) – Original Sinergym environment.

  • ranges (Dict[str, Sequence[Any]]) – Observation variables ranges to apply normalization (rely on environment).

Methods

__init__(env, ranges)

Observations normalized to range [0, 1].

get_unwrapped_obs()

Get last environment observation without normalization.

observation(obs)

Applies normalization to observation.

get_unwrapped_obs() ndarray | None

Get last environment observation without normalization.

Returns:

Last original observation. If it is the first observation, this value is None.

Return type:

Optional[np.ndarray]

observation(obs: ndarray) ndarray

Applies normalization to observation.

Parameters:

obs (np.ndarray) – Original observation.

Returns:

Normalized observation.

Return type:

np.ndarray