@@ -319,7 +319,7 @@ object MatrixFactorizationModel extends Loader[MatrixFactorizationModel] {
319319 j += num
320320 pq.clear()
321321 }
322- (index, (srcIds, dstIdMatrix, new DenseMatrix (m, num, scoreMatrix)))
322+ (index, (srcIds, dstIdMatrix, new DenseMatrix (m, num, scoreMatrix, true )))
323323 }
324324 ratings.aggregateByKey(null : Array [Int ], null : Array [Int ], null : DenseMatrix )(
325325 (rateSum, rate) => mergeFunc(rateSum, rate, num),
@@ -366,7 +366,7 @@ object MatrixFactorizationModel extends Loader[MatrixFactorizationModel] {
366366 tempIdMatrix(matrixIndex + j) = rate._2(matrixIndex + rate_index)
367367 tempScoreMatrix(matrixIndex + j) = rate._3(i, rate_index)
368368 rate_index += 1
369- } else if (rate._3(i, rate_index) < rateSum._3(i, sum_index)) {
369+ } else {
370370 tempIdMatrix(matrixIndex + j) = rateSum._2(matrixIndex + sum_index)
371371 tempScoreMatrix(matrixIndex + j) = rateSum._3(i, sum_index)
372372 sum_index += 1
@@ -375,7 +375,7 @@ object MatrixFactorizationModel extends Loader[MatrixFactorizationModel] {
375375 }
376376 i += 1
377377 }
378- (rateSum._1, tempIdMatrix, new DenseMatrix (row, num, tempScoreMatrix))
378+ (rateSum._1, tempIdMatrix, new DenseMatrix (row, num, tempScoreMatrix, true ))
379379 }
380380 }
381381
0 commit comments