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

Mahmoud Rawas commented on SPARK-16235:
---------------------------------------

I don't fully agree with the statement 'it has no clear meaning' as 
mathematically it still has a quite acceptable representation for the error 
occurred on the predicted value, please check a quick graph created here 
(https://docs.google.com/spreadsheets/d/1VWr0-IO4KZkPwLdzji9gCd-yvRuKbZ3Hc5xnPfWnhsE/edit?usp=sharing)
And returning to the log-loss that is implemented in spark, I would agree with 
the fact that it will only work within the range of [-1,1], but as a developer 
I would prefer to do the values transformation inside the Loss Calculator so 
the mapping from [0,1] into [-1,1] needs to happen in side LogLoss class, and 
by this way both measure will be satisfied, and then user will have to decide 
which measure to use. 
Your Thoughts?

> "evaluateEachIteration" is returning wrong results when calculated for 
> classification model.
> --------------------------------------------------------------------------------------------
>
>                 Key: SPARK-16235
>                 URL: https://issues.apache.org/jira/browse/SPARK-16235
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 1.6.1, 1.6.2, 2.0.0
>            Reporter: Mahmoud Rawas
>
> Basically within the mentioned function there is a code to map the actual 
> value which supposed to be in the range of \[0,1] into the range of \[-1,1], 
> in order to make it compatible with the predicted value produces by a 
> classification mode. 
> {code}
> val remappedData = algo match {
>       case Classification => data.map(x => new LabeledPoint((x.label * 2) - 
> 1, x.features))
>       case _ => data
>     }
> {code}
> the problem with this approach is the fact that it will calculate an 
> incorrect error for an example mse will be be 4 time larger than the actual 
> expected mse 
> Instead we should map the predicted value into probability value in [0,1].



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

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

Reply via email to