HyukjinKwon commented on a change in pull request #25475:
[SPARK-28736][SPARK-28735][PYTHON][ML] Fix PySpark ML tests to pass in JDK 11
URL: https://github.com/apache/spark/pull/25475#discussion_r314661069
##########
File path: python/pyspark/ml/tests/test_algorithms.py
##########
@@ -86,7 +86,7 @@ def test_raw_and_probability_prediction(self):
expected_rawPrediction = [-11.6081922998, -8.15827998691, 22.17757045]
self.assertTrue(result.prediction, expected_prediction)
self.assertTrue(np.allclose(result.probability, expected_probability,
atol=1E-4))
- self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, atol=1E-4))
+ self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, atol=1))
Review comment:
Yup ..
JDK 8:
```
[-11.19194106875243,-7.677866573997363,21.280214474039443]
```
JDK 11:
```
[-11.608192299802019,-8.158279986906651,22.177570449962918]
```
Seems multiple floats affects the results while they are roughly correct.
----------------------------------------------------------------
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]