Skip to content

Commit

Permalink
[FIX] wrong notation in origianl paper (15/02/2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDoYup committed Feb 15, 2019
1 parent 438f216 commit 99a8015
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions RobustSTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def get_season_value(idx):
return sample[idx]

weight_sample = sample[idxs]
t_idxs = [idx - (int((idx -j)/season_len)+1)*season_len for j in idxs]
weights = np.array(list(map(lambda j, t: bilateral_filter(j, t, sample[j], sample[t], ds1, ds2), idxs, t_idxs)))
#t_idxs = [idx - (int((idx -j)/season_len)+1)*season_len for j in idxs]
#weights = np.array(list(map(lambda j, t: bilateral_filter(j, t, sample[j], sample[t], ds1, ds2), idxs, t_idxs)))
weights = np.array(list(map(lambda j: bilateral_filter(j, idx, sample[j], sample[idx], ds1, ds2), idxs)))
season_value = np.sum(weight_sample * weights)/np.sum(weights)
return season_value

Expand Down Expand Up @@ -141,4 +142,4 @@ def run_RobustSTL(_input):
return result
else:
print("[!] input series error")
raise
raise

0 comments on commit 99a8015

Please sign in to comment.