We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
medium
end_to_end
Data Augmentation
Implement deterministic data augmentation transforms for 1D signals.
Given a 1D signal, apply the following transforms based on the transform parameter:
-
“flip”: Reverse the signal:
[1,2,3] -> [3,2,1] -
“scale”: Multiply by a factor:
signal * factor -
“shift”: Circular shift by
amountpositions to the right. Positive shifts to the right:[1,2,3,4], shift=1 -> [4,1,2,3] -
“noise”: Add a fixed noise pattern. Given a noise tensor, return
signal + noise.
Input:
-
signal: 1D tensor of shape(L,) -
transform: string, one of “flip”, “scale”, “shift”, “noise” -
params: dict with transform-specific parameters:- flip: {} (no params)
- scale: {“factor”: float}
- shift: {“amount”: int}
-
noise: {“noise”: tensor of shape
(L,)}
Output: Augmented signal of shape (L,).
Hints
data-augmentation
preprocessing
transforms
pipeline
Sign in to attempt this problem and view the solution.