Closed Berwin77 closed 2 years ago
Evaluator model = demo.loadPmml(path);
List<InputField> inputFields = model.getInputFields();
System.out.println(inputFields);
HashMap<String,Object> hm = new HashMap<>();
hm.put("Sex","female");
hm.put("Pclass",3.0);
hm.put("Age",15.0);
hm.put("SibSp",3.0);
hm.put("Parch",0.0);
hm.put("Fare",1.0);
demo.predict(model,hm);
pmml-model 1.5.12 jpmml-evaluator-spark 1.2.2
The Java/JVM is throwing an NoSuchMethodError
, because your application classpath contains library versions that are not compatible with one another.
In the current case, you should only include the JPMML-Evaluator-Spark
library.
i use scala write a LR model and start with stringindexer model, because i want use orgin data(including string feature and dpuble feature) to predict .
scala 2.11.8 spark 2.3.3 jmmp-spark 1.4.18 pmml-model 1.5.12 jpmml-evaluator-spark 1.2.2
List inputFields = model.getInputFields();
System.out.println(inputFields);
result:
System.out.println("@@@@ "+rawValue); FieldValue inputFieldValue = inputField.prepare(rawValue);
result:
Thanks in advance for helping.