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:
[email protected]


Reply via email to