Algorithm 2.
Input: c0, λ | ||
Output:
| ||
1: | k ← 0 {k is the algorithm iteration number.} | |
2: | A−1 ← 0 | |
3: | while stopping criterion is not satisfied do | |
4: | Draw wk according to chosen distribution. | |
5: | Calculate Gk ← ∇c f (ck, wk) | |
6: | Choose weight αk > 0 {Unweighted case: αk = 1} | |
7: | Ak ← Ak−1+αk | |
8: | {Compute weighted average of gradient.} | |
9: | Choose μk {For example, μk = γAk, where γ > 0 is a constant.} | |
10: | ||
11: | ||
12: | k ← k+1 | |
13: | end while | |
14: |
|