jpmml / jpmml-sparkml

Java library and command-line application for converting Apache Spark ML pipelines to PMML
GNU Affero General Public License v3.0
267 stars 80 forks source link

Cant use spark's QuantileDiscretizer for binning. #75

Closed ChiranjeeviBhagavan closed 5 years ago

ChiranjeeviBhagavan commented 5 years ago

Error Seen below :

Exception in thread "main" java.lang.NoSuchMethodError: org.dmg.pmml.Interval.setLeftMargin(Ljava/lang/Double;)Lorg/dmg/pmml/Interval;
    at org.jpmml.sparkml.feature.BucketizerConverter.encodeFeatures(BucketizerConverter.java:63)
    at org.jpmml.sparkml.FeatureConverter.registerFeatures(FeatureConverter.java:48)
    at org.jpmml.sparkml.PMMLBuilder.build(PMMLBuilder.java:110)
vruusmann commented 5 years ago

Fix your application classpath.

ChiranjeeviBhagavan commented 5 years ago

I was trying to generate a pmml file having QuantileDiscretizer in the pipeline. i was able to generate without this in pipeline though. Any more recommendations ?

vruusmann commented 5 years ago

I was trying to generate a pmml file having QuantileDiscretizer in the pipeline.

Your application classpath is still wrong - the QuantileDiscretizer step simply makes it obvious.

Any more recommendations?

See the README that corresponds to your Apache Spark version. The JPMML-SparkML repository contains multiple development branches, one for each supported Spache Spark version. If you apply 2.4.X instructions to 2.2.X or 2.3.X, you'll have trouble.