srowen commented on a change in pull request #20793:
[SPARK-23643][CORE][SQL][ML] Shrinking the buffer in hashSeed up to size of the
seed parameter
URL: https://github.com/apache/spark/pull/20793#discussion_r267727444
##########
File path:
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
##########
@@ -2226,21 +2219,21 @@ class LogisticRegressionSuite extends MLTest with
DefaultReadWriteTest {
*/
val coefficientsRStd = new DenseMatrix(3, 4, Array(
- 0.0, 0.0, 0.0, 0.08351653,
- -0.1058702, 0.3183251, -0.1212969, -0.1629778,
- 0.0, -0.3943069, 0.0, 0.0), isTransposed = true)
- val interceptsRStd = Vectors.dense(-0.50133383, -0.3151913, 0.8165252)
+ 0.0, 0.0, 0.0, 0.09074857,
+ -0.09093399, 0.28078251, -0.12854559, -0.18382494,
+ 0.0, -0.4064444, 0.0, 0.0), isTransposed = true)
+ val interceptsRStd = Vectors.dense(-0.55325803, -0.27291366, 0.8261717)
val coefficientsR = new DenseMatrix(3, 4, Array(
- 0.0, 0.0, 0.02384198, 0.03127749,
- -0.04949061, 0.0, -0.18584462, -0.08952455,
+ 0.0, 0.0, 0.02312769, 0.04159224,
+ -0.03776471, 0.0, -0.19588206, -0.11187712,
0.0, 0.0, 0.0, 0.0), isTransposed = true)
- val interceptsR = Vectors.dense(-0.38857157, 0.62492165, -0.2363501)
+ val interceptsR = Vectors.dense(-0.40016908, 0.62474768, -0.2245786)
assert(model1.coefficientMatrix ~== coefficientsRStd absTol 0.05)
assert(model1.interceptVector ~== interceptsRStd absTol 0.1)
assert(model1.interceptVector.toArray.sum ~== 0.0 absTol eps)
assert(model2.coefficientMatrix ~== coefficientsR absTol 0.01)
- assert(model2.interceptVector ~== interceptsR absTol 0.01)
+ assert(model2.interceptVector ~== interceptsR absTol 0.9)
Review comment:
Hm, that seems like an unexpectedly large difference for model2. How about
increasing its max iterations instead, to about 220 to match model1?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]