我正在使用jpmml库来解析PMML文档(带有根元素PMML的xml文档).我能够解析一些元素但不是全部.在这里,我无法解析RegressionTable元素中的CategoricalPredictor属性.解析CategoricalPredictor的代码是:
RegressionTable regressionTable = new RegressionTable(intercept);
List categoricalPredictor=regressionTable.getCategoricalPredictors();
/*Categorical predictors*/
System.out.println("Categorical Predictors:");
for(CategoricalPredictor c : categoricalPredictor){
System.out.println("Name :"+c.getName()+",\tValue :"+c.getValue()+
",\tCoefficient :"+c.getCoefficient());
System.out.println();
}
有了这段代码,我只得到分类预测器:作为输出.
我该怎么做才能得到它?你的努力将是值得的.
提前致谢.