You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by GitBox <gi...@apache.org> on 2021/05/05 20:07:05 UTC

[GitHub] [systemds] j143 opened a new pull request #1260: [SYSTEMDS-2968] Cumulative sum with decay multiplier

j143 opened a new pull request #1260:
URL: https://github.com/apache/systemds/pull/1260


   Generally used for efficient calculation with the help of
   momentum as discussed at https://cs.stackexchange.com/a/73760
   
   --
   For people familiar with python
   ```py
   import numpy as np
   
   data = np.array([2, 3, 0, 0, 4, 3], dtype=float)
   
   result = []
   last_value = 0
   for d in data:
       last_value = (last_value + d)*.95 # apply decay=0.95
       result.append(last_value)
   ```
   Related discussion as to how to cumsum with decay with:
   
   NumPy - https://stackoverflow.com/q/28915088
   
   Tensorflow 2.0 - https://stackoverflow.com/a/60635516
   
   R - https://stackoverflow.com/q/14814752


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [systemds] j143 merged pull request #1260: [SYSTEMDS-2968] Cumulative sum with decay multiplier

Posted by GitBox <gi...@apache.org>.
j143 merged pull request #1260:
URL: https://github.com/apache/systemds/pull/1260


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org