You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (JIRA)" <ji...@apache.org> on 2016/08/11 22:39:20 UTC

[jira] [Comment Edited] (SPARK-17027) PolynomialExpansion.choose is prone to integer overflow

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

Maciej Szymkiewicz edited comment on SPARK-17027 at 8/11/16 10:38 PM:
----------------------------------------------------------------------

Yes, this is exactly the problem. 


{code}
choose(14, 10)
// res0: Int = -182
{code}


was (Author: zero323):
Yes, this exactly the problem. 


{code}
choose(14, 10)
// res0: Int = -182
{code}

> PolynomialExpansion.choose is prone to integer overflow 
> --------------------------------------------------------
>
>                 Key: SPARK-17027
>                 URL: https://issues.apache.org/jira/browse/SPARK-17027
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Maciej Szymkiewicz
>            Priority: Minor
>
> Current implementation computes power of k directly and because of that it is susceptible to integer overflow on relatively small input (4 features, degree equal 10).  It would be better to use recursive formula instead.



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

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