[SPARK-4972][MLlib] Updated the scala doc for lasso and ridge regression for the change of LeastSquaresGradient

In #SPARK-4907, we added factor of 2 into the LeastSquaresGradient. We updated the scala doc for lasso and ridge regression here.

Author: DB Tsai <dbtsai@alpinenow.com>

Closes #3808 from dbtsai/doc and squashes the following commits:

ec3c989 [DB Tsai] first commit
This commit is contained in:
DB Tsai 2014-12-29 17:17:12 -08:00 committed by Xiangrui Meng
parent 343db392b5
commit 040d6f2d13
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ class LassoModel (
/**
* Train a regression model with L1-regularization using Stochastic Gradient Descent.
* This solves the l1-regularized least squares regression formulation
* f(weights) = 1/n ||A weights-y||^2 + regParam ||weights||_1
* f(weights) = 1/2n ||A weights-y||^2 + regParam ||weights||_1
* Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with
* its corresponding right hand side label y.
* See also the documentation for the precise formulation.

View file

@ -45,7 +45,7 @@ class RidgeRegressionModel (
/**
* Train a regression model with L2-regularization using Stochastic Gradient Descent.
* This solves the l1-regularized least squares regression formulation
* f(weights) = 1/n ||A weights-y||^2 + regParam/2 ||weights||^2
* f(weights) = 1/2n ||A weights-y||^2 + regParam/2 ||weights||^2
* Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with
* its corresponding right hand side label y.
* See also the documentation for the precise formulation.