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

    https://github.com/apache/spark/pull/245#discussion_r11013629
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/optimization/Gradient.scala ---
    @@ -26,17 +28,26 @@ abstract class Gradient extends Serializable {
       /**
        * Compute the gradient and loss given the features of a single data 
point.
        *
    -   * @param data - Feature values for one data point. Column matrix of 
size dx1
    -   *               where d is the number of features.
    -   * @param label - Label for this data item.
    -   * @param weights - Column matrix containing weights for every feature.
    +   * @param data features for one data point
    +   * @param label label for this data point
    +   * @param weights weights/coefficients corresponding to features
        *
    -   * @return A tuple of 2 elements. The first element is a column matrix 
containing the computed
    -   *         gradient and the second element is the loss computed at this 
data point.
    +   * @return (gradient: Vector, loss: Double)
    +   */
    +  def compute(data: Vector, label: Double, weights: Vector): (Vector, 
Double)
    +
    +  /**
    +   * Compute the gradient and loss given the features of a single data 
point, add the gradient to a provided vector to
    --- End diff --
    
    100 characters limit.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to