Skip to content

Commit ec3c989

Browse files
author
DB Tsai
committed
first commit
1 parent f9ed2b6 commit ec3c989

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/mllib/regression/Lasso.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class LassoModel (
4545
/**
4646
* Train a regression model with L1-regularization using Stochastic Gradient Descent.
4747
* This solves the l1-regularized least squares regression formulation
48-
* f(weights) = 1/n ||A weights-y||^2 + regParam ||weights||_1
48+
* f(weights) = 1/2n ||A weights-y||^2 + regParam ||weights||_1
4949
* Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with
5050
* its corresponding right hand side label y.
5151
* See also the documentation for the precise formulation.

mllib/src/main/scala/org/apache/spark/mllib/regression/RidgeRegression.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class RidgeRegressionModel (
4545
/**
4646
* Train a regression model with L2-regularization using Stochastic Gradient Descent.
4747
* This solves the l1-regularized least squares regression formulation
48-
* f(weights) = 1/n ||A weights-y||^2 + regParam/2 ||weights||^2
48+
* f(weights) = 1/2n ||A weights-y||^2 + regParam/2 ||weights||^2
4949
* Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with
5050
* its corresponding right hand side label y.
5151
* See also the documentation for the precise formulation.

0 commit comments

Comments
 (0)