Skip to content

Min_max_scale gives unbounded values in case of constant input series #844

Description

@reinecfi

In case of constant input x, the min_max_scale function can return unbounded values x.
If abs(x) >> 1, this can lead to fully saturated outputs of learning agents (such that the outcome of learning is predetermined by the seed).

    # Avoid division by zero
    if min_val == max_val:
        return x
    return (x - min_val) / (max_val - min_val)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions