我的 pmml 文件链接。由 R-Tool 生成
这是我的java代码..
PMML model = null;
File inputFilePath = new File("/home/equation/iris_rf.pmml");
try (InputStream is = new FileInputStream(inputFilePath)) {
model = org.jpmml.model.PMMLUtil.unmarshal(is);
} catch (Exception e) {
throw e;
}
// construct a tree predictor based on the PMML
ModelEvaluator<TreeModel> modelEvaluator = new TreeModelEvaluator(model);
System.out.println(modelEvaluator.getSummary());
例外 - -
Exception in thread "main" org.jpmml.evaluator.InvalidFeatureException: PMML
at org.jpmml.evaluator.ModelEvaluator.selectModel(ModelEvaluator.java:528)
at org.jpmml.evaluator.tree.TreeModelEvaluator.<init>(TreeModelEvaluator.java:64)
at com.girnarsoft.Pmml.main(Pmml.java:24)
任何想法?为什么会出现此错误?