jpmml / jpmml-sklearn

Java library and command-line application for converting Scikit-Learn pipelines to PMML
GNU Affero General Public License v3.0
531 stars 117 forks source link

Conflict in org.jpmml.sklearn.ClassifierTest over last decimal place #144

Closed aeftimia closed 4 years ago

aeftimia commented 4 years ago

When I run mvn install, I see

[INFO] Running org.jpmml.sklearn.ClassifierTest Conflict{id=1231, arguments={Age=25, Employment=Private, Education=College, Marital=Married, Occupation=Professional, Income=39876.3, Gender=Male, Deductions=FALSE, Hours=45, Adjusted=0}, difference=not equal: value differences={probability(0)=(0.4531295819572565, 0.4531295819572566)}}

I'm running a Macbook Pro 10.14.6.

vruusmann commented 4 years ago

I'm running a Macbook Pro 10.14.6.

The Java/JVM that is shipped with Mac(OS?) is doing floating-point arithmetics a bit differently than Oracle JDK and OpenJDK.

I'm personally running OpenJDK on GNU/Linux, and have "calibrated" integration test acceptance criteria based on this environment. I won't be relaxing them for no good reason.

You can get a pre-built JPMML-SkLearn library JAR file from the Maven Central repository. If you insist on building one locally, then simply disable Apache Maven tests.