Skip to content

Commit 95e44b4

Browse files
Feynman Liangjkbradley
authored andcommitted
[SPARK-9800] Adds docs for GradientDescent$.runMiniBatchSGD alias
* Adds doc for alias of runMIniBatchSGD documenting default value for convergeTol * Cleans up a note in code Author: Feynman Liang <[email protected]> Closes #8425 from feynmanliang/SPARK-9800. (cherry picked from commit c0e9ff1) Signed-off-by: Joseph K. Bradley <[email protected]>
1 parent 5a32ed7 commit 95e44b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ object GradientDescent extends Logging {
235235

236236
if (miniBatchSize > 0) {
237237
/**
238-
* NOTE(Xinghao): lossSum is computed using the weights from the previous iteration
238+
* lossSum is computed using the weights from the previous iteration
239239
* and regVal is the regularization value computed in the previous iteration as well.
240240
*/
241241
stochasticLossHistory.append(lossSum / miniBatchSize + regVal)
@@ -264,6 +264,9 @@ object GradientDescent extends Logging {
264264

265265
}
266266

267+
/**
268+
* Alias of [[runMiniBatchSGD]] with convergenceTol set to default value of 0.001.
269+
*/
267270
def runMiniBatchSGD(
268271
data: RDD[(Double, Vector)],
269272
gradient: Gradient,

0 commit comments

Comments
 (0)