Closed jye0829 closed 1 month ago
In the meanwhile, I use jpmml-model to run the json format of pmml. But I failed all the time. So I wonder can I use the evaluator to run the xgboost classifier model.jar on the evaluator without using jaxb
The LoadingModelEvaluatorBuilder
cannot be used on Android, because it attempts to load the PMML XML document using Jakarta XML Binding (JAXB) technology.
You should be using its superclass ModelEvaluatorBuilder
instead. It is your choice then how you deliver the org.dmg.pmml.PMML
object to its constructor.
So I wonder can I use the evaluator to run the xgboost classifier model.jar on the evaluator without using jaxb
I would personally recommend you to transpile the PMML XML document into a Java class using the JPMML-Transpiler library. Then instantiate this class, and pass this instance to ModelEvaluatorBuilder
constructor.
In pseudocode:
# The PMML$12345 class was generated from PMML XML document by JPMML-Transpiler
PMML pmml = new PMML$12345();
Evaluator evaluator = new ModelEvaluatorBuilder(pmml)
.build();
E FATAL EXCEPTION: OpenCVCameraBackground Process: com.zhenzhe.javacv, PID: 12163