-
- Downloads
[SPARK-9277] [MLLIB] SparseVector constructor must throw an error when...
[SPARK-9277] [MLLIB] SparseVector constructor must throw an error when declared number of elements less than array length Check that SparseVector size is at least as big as the number of indices/values provided. And add tests for constructor checks. CC MechCoder jkbradley -- I am not sure if a change needs to also happen in the Python API? I didn't see it had any similar checks to begin with, but I don't know it well. Author: Sean Owen <sowen@cloudera.com> Closes #7794 from srowen/SPARK-9277 and squashes the following commits: e8dc31e [Sean Owen] Fix scalastyle 6ffe34a [Sean Owen] Check that SparseVector size is at least as big as the number of indices/values provided. And add tests for constructor checks.
Showing
- mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala 2 additions, 0 deletions...rc/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
- mllib/src/test/scala/org/apache/spark/mllib/linalg/VectorsSuite.scala 15 additions, 0 deletions...st/scala/org/apache/spark/mllib/linalg/VectorsSuite.scala
Loading
Please register or sign in to comment