Skip to content

Commit

Permalink
Minor improvements of README
Browse files Browse the repository at this point in the history
  • Loading branch information
mp4096 committed Dec 31, 2015
1 parent a8a473c commit ac69686
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ All solvers require the stochastic gradient of the objective `sg`, initial value
The solver function returns a matrix with the `i`-th guess of the decision variables in the `i+1`-th column (first column contains `x0`).

A typical solver calling script would look like this:
```matlab
gs = @<stochastic gradient function>;
x0 = [0; 0; 0; 0];
nIter = 500;
idxSG = randi(<number of stochastic gradients>, 1, nIter);
```
gs = @(idx, x) <stochastic gradient function>;
x0 = <initial decision variables guess>;
nIter = <number of iterations>;
idxSG = randi(<max index of the stochastic gradient>, 1, nIter);
xMat = <solver>(gs, x0, nIter, idxSG, <solver parameters>);
xMat = <solver>(gs, x0, nIter, idxSG, <solver parameter 1>, ..., <solver parameter N>);
```

See also the test files for usage examples.

0 comments on commit ac69686

Please sign in to comment.