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

Weichen Xu commented on SPARK-21770:
------------------------------------

Hmm... `normalizeToProbabilitiesInPlace` is only effective in the case when we 
use class instance counts as `rawPrediction`.
So, I guess the meaning is, when we have empty instance set, all the counts == 
0, in this case, how to assume the probability for each class ? The uniform 
distribution is a reasonable assumption I think.
But I am not sure whether this change will cause issues in other places.

> ProbabilisticClassificationModel: Improve normalization of all-zero raw 
> predictions
> -----------------------------------------------------------------------------------
>
>                 Key: SPARK-21770
>                 URL: https://issues.apache.org/jira/browse/SPARK-21770
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 2.3.0
>            Reporter: Siddharth Murching
>            Priority: Minor
>
> Given an n-element raw prediction vector of all-zeros, 
> ProbabilisticClassifierModel.normalizeToProbabilitiesInPlace() should output 
> a probability vector of all-equal 1/n entries



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to