Skip to content

Commit dc4f4ba

Browse files
committed
reset threshold values for doStack and remove UT
1 parent 56194eb commit dc4f4ba

File tree

2 files changed

+1
-6
lines changed
  • mllib/src

2 files changed

+1
-6
lines changed

mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ object ALS extends DefaultParamsReadable[ALS] with Logging {
13251325
var numExplicits = 0
13261326
// Stacking factors(vectors) in matrices to speed up the computation,
13271327
// when the number of factors and the rank is large enough.
1328-
val doStack = srcPtrs(j + 1) - srcPtrs(j) > 128 && rank > 128
1328+
val doStack = srcPtrs(j + 1) - srcPtrs(j) > 1024 && rank > 1024
13291329
val srcFactorBuffer = mutable.ArrayBuilder.make[Double]
13301330
val bBuffer = mutable.ArrayBuilder.make[Double]
13311331
while (i < srcPtrs(j + 1)) {

mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@ class ALSSuite
389389
targetRMSE = 0.3)
390390
}
391391

392-
test("rank-129 matrix with stacking factors in matrices") {
393-
val (training, test) = genExplicitTestData(numUsers = 200, numItems = 20, rank = 1)
394-
testALS(training, test, maxIter = 1, rank = 129, regParam = 0.01, targetRMSE = 0.02)
395-
}
396-
397392
test("using generic ID types") {
398393
val (ratings, _) = genImplicitTestData(numUsers = 20, numItems = 40, rank = 2, noiseStd = 0.01)
399394

0 commit comments

Comments
 (0)