-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid regression normalization method #14
Comments
Quote:
Exactly, I am using softmax: <Segment id="2">
<True/>
<RegressionModel functionName="classification" normalizationMethod="softmax">
<MiningSchema>
<MiningField name="_target" usageType="target"/>
<MiningField name="xgbValue"/>
</MiningSchema>
<Output>
<OutputField dataType="double" feature="probability" name="probability_0" optype="continuous" value="0"/>
<OutputField dataType="double" feature="probability" name="probability_1" optype="continuous" value="1"/>
</Output>
<RegressionTable intercept="0.0" targetCategory="0">
<NumericPredictor coefficient="-1.0" name="xgbValue"/>
</RegressionTable>
<RegressionTable intercept="0.0" targetCategory="1"/>
</RegressionModel>
</Segment> |
Thank you for pointing out the source. I modified the code located in if(regressionTables.size() == 2 && !normalizationMethod.equals(RegressionModel.NormalizationMethod.SOFTMAX)){
valueMapBuilder.staticUpdate(RegressionModelUtil.class, "computeBinomialProbabilities", normalizationMethod);
} And transpiled it again. It works! |
The PMML document in question appears to be problematic. Specifically, the regression normalization method should be Which software was used for producing it? It doesn't look to be the JPMML-XGBoost library, because it would be generating the following PMML markup instead: <Segment id="2">
<True/>
<RegressionModel functionName="regression" normalizationMethod="logit" x-mathContext="float">
<MiningSchema>
<MiningField name="_target" usageType="target"/>
<MiningField name="xgbValue"/>
</MiningSchema>
<RegressionTable intercept="0.0">
<NumericPredictor name="xgbValue" coefficient="1.0"/>
</RegressionTable>
</RegressionModel>
</Segment> |
Closing as "won't fix" - the JPMML-Transpiler library is not in the business of analyzing and correcting invalid PMML documents. Please use a proper PMML producer software. |
Extracted from #13 (comment)
Quote:
Thanks for your help! I manage to transpile a XGBoost Model by following your instruction.
But I am getting this error when doing evaluation
Which is from this line of code
Map<FieldName, ?> results = evaluator.evaluate(arguments);
I am doing just fine for the same evaluation code when using the untranspiled .pmml model. Could you please help?
The text was updated successfully, but these errors were encountered: