Created
August 12, 2017 22:20
-
-
Save wsuzume/b6c7e76931070eaa4210a3635306e6e5 to your computer and use it in GitHub Desktop.
o_transform transforms "time series signal of values" to "current values taking past values into account in each terms"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def o_transform(signal): | |
ret = [] | |
for n in range(1, len(signal)+1): | |
a = 2 / (n + 1) | |
d = -2 / (n * (n + 1)) | |
s = 0 | |
for t in range(n): | |
s += signal[t] * (a + t * d) | |
ret.append(s) | |
return np.array(ret) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
o_transform's definition is
where
or you can choose any monotonically decreasing function which suffices