[ 
https://issues.apache.org/jira/browse/FLINK-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286471#comment-15286471
 ] 

ASF GitHub Bot commented on FLINK-1979:
---------------------------------------

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

    https://github.com/apache/flink/pull/1985#discussion_r63509887
  
    --- Diff: 
flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/optimization/PartialLossFunction.scala
 ---
    @@ -47,21 +47,106 @@ object SquaredLoss extends PartialLossFunction {
     
       /** Calculates the loss depending on the label and the prediction
         *
    -    * @param prediction
    -    * @param label
    -    * @return
    +    * @param prediction The predicted value
    +    * @param label The true value
    +    * @return The loss
         */
       override def loss(prediction: Double, label: Double): Double = {
         0.5 * (prediction - label) * (prediction - label)
       }
     
       /** Calculates the derivative of the [[PartialLossFunction]]
         *
    -    * @param prediction
    -    * @param label
    -    * @return
    +    * @param prediction The predicted value
    +    * @param label The true value
    +    * @return The derivative of the loss function
    --- End diff --
    
    Good code completion, thanks :-)


> Implement Loss Functions
> ------------------------
>
>                 Key: FLINK-1979
>                 URL: https://issues.apache.org/jira/browse/FLINK-1979
>             Project: Flink
>          Issue Type: Improvement
>          Components: Machine Learning Library
>            Reporter: Johannes Günther
>            Assignee: Johannes Günther
>            Priority: Minor
>              Labels: ML
>
> For convex optimization problems, optimizer methods like SGD rely on a 
> pluggable implementation of a loss function and its first derivative.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to