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

    https://github.com/apache/spark/pull/2451#discussion_r17807514
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/optimization/Gradient.scala ---
    @@ -157,3 +157,221 @@ class HingeGradient extends Gradient {
         }
       }
     }
    +
    +/**
    + * :: DeveloperApi ::
    + * Class used to compute the gradient for a loss function, given a series 
of data points.
    + */
    +@DeveloperApi
    +abstract class MultiModelGradient extends Serializable {
    +  /**
    +   * Compute the gradient and loss given the features of all data points.
    +   *
    +   * @param data features for one data point
    +   * @param label label for this data point
    +   * @param weights weights/coefficients corresponding to features
    +   *
    +   * @return (gradient: DenseMatrix, loss: Double)
    +   */
    +  def compute(data: Matrix, label: DenseMatrix,
    +                       weights: DenseMatrix): (DenseMatrix, Matrix)
    --- End diff --
    
    spacing (here and in methods below)


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to