我有以下 pmml 文件:
<?xml version="1.0" ?>
<PMML>
<Header copyright="">
<Timestamp>2015-10-02 14:41:20.278000</Timestamp>
</Header>
<DataDictionary numberOfFields="5">
<DataField dataType="double" name="sepal length" optype="continuous"/>
<DataField dataType="double" name="sepal width" optype="continuous"/>
<DataField dataType="double" name="petal length" optype="continuous"/>
<DataField dataType="double" name="petal width" optype="continuous"/>
<DataField dataType="string" name="result" optype="categorical">
<Value value="iris setosa"/>
<Value value="iris versicolor"/>
<Value value="iris virginica"/>
</DataField>
</DataDictionary>
<RegressionModel functionName="regression" modelName="IrisRegression" normalizationMethod="softmax" targetFieldName="result">
<MiningSchema>
<MiningField name="sepal length"/>
<MiningField name="sepal width"/>
<MiningField name="petal length"/>
<MiningField name="petal width"/>
<MiningField name="result" usageType="predicted"/>
</MiningSchema>
<RegressionTable intercept="0.265606167976">
<NumericPredictor coefficient="0.414988328296" name="sepal length"/>
<NumericPredictor coefficient="1.46129738856" name="sepal width"/>
<NumericPredictor coefficient="-2.2621411772" name="petal length"/>
<NumericPredictor coefficient="-1.02909509924" name="petal width"/>
</RegressionTable>
<RegressionTable intercept="1.08542374239">
<NumericPredictor coefficient="0.416639685595" name="sepal length"/>
<NumericPredictor coefficient="-1.60083318526" name="sepal width"/>
<NumericPredictor coefficient="0.577657628678" name="petal length"/>
<NumericPredictor coefficient="-1.38553842866" name="petal width"/>
</RegressionTable>
<RegressionTable intercept="-1.21471457808">
<NumericPredictor coefficient="-1.70752515382" name="sepal length"/>
<NumericPredictor coefficient="-1.53426833999" name="sepal width"/>
<NumericPredictor coefficient="2.47097168077" name="petal length"/>
<NumericPredictor coefficient="2.55538211298" name="petal width"/>
</RegressionTable>
</RegressionModel>
</PMML>
当我尝试使用 jpmml-evaluator 对其进行评估时,我收到此错误:org.jpmml.evaluator.InvalidFeatureException: RegressionModel
它适用于线性回归。任何想法为什么我会收到此错误?我的 pmml 文件是否有问题?
编辑:我将 functionName 更改为regression
,现在出现以下错误:
org.jpmml.evaluator.InvalidFeatureException: RegressionTable
at org.jpmml.evaluator.RegressionModelEvaluator.evaluateClassification(RegressionModelEvaluator.java:140)
at org.jpmml.evaluator.RegressionModelEvaluator.evaluate(RegressionModelEvaluator.java:70)
at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:345)
at tryEvaluator.Example.somefunction(Example.java:75)
at tryEvaluator.Example.main(Example.java:110)