zhengruifeng commented on a change in pull request #32124:
URL: https://github.com/apache/spark/pull/32124#discussion_r613820574
##########
File path:
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
##########
@@ -982,14 +982,14 @@ class LogisticRegression @Since("1.2.0") (
val adapt = Array.ofDim[Double](numClasses)
BLAS.javaBLAS.dgemv("N", numClasses, numFeatures, 1.0,
initialSolution, numClasses, scaledMean, 1, 0.0, adapt, 1)
- BLAS.getBLAS(numFeatures).daxpy(numClasses, 1.0, adapt, 0, 1,
+ BLAS.javaBLAS.daxpy(numClasses, 1.0, adapt, 0, 1,
initialSolution, numClasses * numFeatures, 1)
} else {
- // orginal `initialCoefWithInterceptArray` is for problem:
+ // original `initialSolution` is for problem:
// y = f(w1 * x1 / std_x1, w2 * x2 / std_x2, ..., intercept)
// we should adjust it to the initial solution for problem:
// y = f(w1 * (x1 - avg_x1) / std_x1, w2 * (x2 - avg_x2) / std_x2,
..., intercept)
- val adapt = BLAS.getBLAS(numFeatures).ddot(numFeatures,
initialSolution, 1, scaledMean, 1)
+ val adapt = BLAS.javaBLAS.ddot(numFeatures, initialSolution, 1,
scaledMean, 1)
Review comment:
here `ddot` is only called once in one training, so just use javaBLAS
for simplication
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]