Github user sethah commented on a diff in the pull request: https://github.com/apache/spark/pull/15874#discussion_r87908012 --- Diff: mllib/src/main/scala/org/apache/spark/ml/feature/MinHashLSH.scala --- @@ -125,11 +125,11 @@ class MinHash(override val uid: String) extends LSH[MinHashModel] with HasSeed { @Since("2.1.0") override protected[ml] def createRawLSHModel(inputDim: Int): MinHashModel = { - require(inputDim <= MinHash.prime / 2, - s"The input vector dimension $inputDim exceeds the threshold ${MinHash.prime / 2}.") + require(inputDim <= MinHashLSH.prime / 2, + s"The input vector dimension $inputDim exceeds the threshold ${MinHashLSH.prime / 2}.") val rand = new Random($(seed)) val numEntry = inputDim * 2 - val randCoofs: Array[Int] = Array.fill($(outputDim))(1 + rand.nextInt(MinHash.prime - 1)) + val randCoofs: Array[Int] = Array.fill($(numHashTables))(1 + rand.nextInt(MinHashLSH.prime - 1)) --- End diff -- `randCoefs`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org