Commit 524bcb9
[SPARK-17027][ML] Avoid integer overflow in PolynomialExpansion.getPolySize
Replaces custom choose function with o.a.commons.math3.CombinatoricsUtils.binomialCoefficient
Spark unit tests
Author: zero323 <[email protected]>
Closes apache#14614 from zero323/SPARK-17027.
(cherry picked from commit 0ebf7c1)
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit b54a586)1 parent 1a48d75 commit 524bcb9
File tree
2 files changed
+30
-4
lines changed- mllib/src
- main/scala/org/apache/spark/ml/feature
- test/scala/org/apache/spark/ml/feature
2 files changed
+30
-4
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | | - | |
88 | | - | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
111 | 135 | | |
112 | 136 | | |
0 commit comments