We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fe17c0 commit aea0247Copy full SHA for aea0247
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
@@ -455,7 +455,13 @@ class RowMatrix(
455
* between columns of this matrix.
456
*/
457
def columnSimilarities(threshold: Double): CoordinateMatrix = {
458
- require(threshold >= 0 && threshold <= 1, s"Threshold not in [0,1]: $threshold")
+ require(threshold >= 0, s"Threshold cannot be negative: $threshold")
459
+
460
+ if (threshold > 1) {
461
+ logWarning(s"Threshold is greater than 1: $threshold " +
462
+ "Computation will be more efficient with promoted sparsity, " +
463
+ " however there is no correctness guarantee.")
464
+ }
465
466
val gamma = if (threshold < 1e-6) {
467
Double.PositiveInfinity
0 commit comments