jpmml / jpmml-evaluator-hive

PMML evaluator library for the Apache Hive data warehouse software (http://hive.apache.org/)
GNU Affero General Public License v3.0
6 stars 2 forks source link

grammatical problem when PMML with probability #2

Open youzp opened 6 years ago

youzp commented 6 years ago

hi, there will be a grammatical problem when pmml with probability. It works fine to get rid of the parentheses.

FAILED: SemanticException java.lang.IllegalArgumentException: Error: : expected at the position 28 of 'struct<label:int,probability(0):double,probability(1):double>' but '(' is found.

<Segment id="2">
    <True/>
    <RegressionModel functionName="classification" normalizationMethod="none">
        <MiningSchema>
            <MiningField name="label" usageType="target"/>
            <MiningField name="transformedDecisionFunction(1)"/>
        </MiningSchema>
        <Output>
            <OutputField name="probability(0)" optype="continuous" dataType="double" feature="probability" value="0"/>
            <OutputField name="probability(1)" optype="continuous" dataType="double" feature="probability" value="1"/>
        </Output>
        <RegressionTable intercept="0.0" targetCategory="1">
            <NumericPredictor name="transformedDecisionFunction(1)" coefficient="1.0"/>
        </RegressionTable>
        <RegressionTable intercept="0.0" targetCategory="0"/>
    </RegressionModel>
</Segment>
vruusmann commented 6 years ago

Related issue: https://github.com/jpmml/jpmml-converter/issues/10

vruusmann commented 6 years ago

Reopened as a reminder to take a look at this again when the JPMML-Evaluator has been updated with "soft rename" functionality (plus some other relevant API niceties).