Skip to content
DeepForgeby svx
All problems
MediumTime Seriests-250

RevIN Denormalize

Problem

Invert reversible instance normalization: value * std + mean for each value.

Return the denormalized list, restoring the original level and scale.

Hint

The inverse uses the window statistics saved at normalization time.

Test cases

case 1
in: [[0],5,2]
expected: [5]
case 2
in: [[-1,1],10,2]
expected: [8,12]
case 3
in: [[],1,1]
expected: []
case 4
in: [[0.5],0,1]
expected: [0.5]
Starter codePython
def revin_denormalize(normalized, mean, std):
    # Your code here
    pass

4 test cases · run your code against them in the editor