Skip to content

Commit

Permalink
reset threshold values for doStack and remove UT
Browse files Browse the repository at this point in the history
  • Loading branch information
hqzizania committed Oct 21, 2016
1 parent 56194eb commit dc4f4ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ object ALS extends DefaultParamsReadable[ALS] with Logging {
var numExplicits = 0
// Stacking factors(vectors) in matrices to speed up the computation,
// when the number of factors and the rank is large enough.
val doStack = srcPtrs(j + 1) - srcPtrs(j) > 128 && rank > 128
val doStack = srcPtrs(j + 1) - srcPtrs(j) > 1024 && rank > 1024
val srcFactorBuffer = mutable.ArrayBuilder.make[Double]
val bBuffer = mutable.ArrayBuilder.make[Double]
while (i < srcPtrs(j + 1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,6 @@ class ALSSuite
targetRMSE = 0.3)
}

test("rank-129 matrix with stacking factors in matrices") {
val (training, test) = genExplicitTestData(numUsers = 200, numItems = 20, rank = 1)
testALS(training, test, maxIter = 1, rank = 129, regParam = 0.01, targetRMSE = 0.02)
}

test("using generic ID types") {
val (ratings, _) = genImplicitTestData(numUsers = 20, numItems = 40, rank = 2, noiseStd = 0.01)

Expand Down

0 comments on commit dc4f4ba

Please sign in to comment.