Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1908#discussion_r16143689
  
    --- Diff: docs/mllib-linear-methods.md ---
    @@ -33,24 +33,23 @@ the task of finding a minimizer of a convex function 
`$f$` that depends on a var
     Formally, we can write this as the optimization problem `$\min_{\wv 
\in\R^d} \; f(\wv)$`, where
     the objective function is of the form
     `\begin{equation}
    -    f(\wv) := 
    -    \frac1n \sum_{i=1}^n L(\wv;\x_i,y_i) +
    -    \lambda\, R(\wv_i)
    +    f(\wv) := \lambda\, R(\wv) +
    +    \frac1n \sum_{i=1}^n L(\wv;\x_i,y_i)
         \label{eq:regPrimal}
         \ .
     \end{equation}`
     Here the vectors `$\x_i\in\R^d$` are the training data examples, for 
`$1\le i\le n$`, and
     `$y_i\in\R$` are their corresponding labels, which we want to predict. 
     We call the method *linear* if $L(\wv; \x, y)$ can be expressed as a 
function of $\wv^T x$ and $y$.
    -Several MLlib's classification and regression algorithms fall into this 
category,
    +Several of MLlib's classification and regression algorithms fall into this 
category,
     and are discussed here.
     
     The objective function `$f$` has two parts:
    -the loss that measures the error of the model on the training data, 
    -and the regularizer that measures the complexity of the model.
    -The loss function `$L(\wv;.)$` must be a convex function in `$\wv$`.
    +the regularizer that controls the complexity of the model,
    +and the loss that measures the error of the model on the training data.
    +The loss function `$L(\wv;.)$` is typically a convex function in `$\wv$`.
     The fixed regularization parameter `$\lambda \ge 0$` (`regParam` in the 
code) defines the trade-off
    -between the two goals of small loss and small model complexity.
    +between the two goals of minimizing the loss (i.e., training error) and 
minimizing model complexity (i.e., to avoid overfitting).
    --- End diff --
    
    minor: This line is too long. We don't have a style guide for markdown 
files. Usually I would try to make each line contain at most 100 chars, and do 
not put more than one sentences in the same line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to