Skip to content

Eval denormalization bug: using (z + MIN) * (MAX - MIN) instead of z * (MAX - MIN) + MIN #9

@William-island

Description

@William-island

In evaluation, inverse min–max scaling is implemented as:

real = (event_time_non_mask[:,0,:].detach().cpu() + MIN[1]) * (MAX[1]-MIN[1])
gen = (sampled_seq[:,0,:1].detach().cpu() + MIN[1]) * (MAX[1]-MIN[1])

and

real = (real + torch.tensor([MIN[2:]])) * (torch.tensor([MAX[2:]])-torch.tensor([MIN[2:]]))
gen = (gen + torch.tensor([MIN[2:]])) * (torch.tensor([MAX[2:]])-torch.tensor([MIN[2:]]))

It shifts and scales wrongly, biasing MAE/RMSE and distance metrics.

For min–max normalization z = (x - MIN) / (MAX - MIN), denormalization is x = z * (MAX - MIN) + MIN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions