Skip to content
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

missing 'feature' in outputField #38

Closed
Ying456123 opened this issue Jul 25, 2019 · 2 comments
Closed

missing 'feature' in outputField #38

Ying456123 opened this issue Jul 25, 2019 · 2 comments

Comments

@Ying456123
Copy link

Ying456123 commented Jul 25, 2019

@vruusmann Now I using the jpmml-xgboost-1.3.11 to generate a xgboost pmml model. However, I found there is not a 'feature in outputField which will cause spss cannot load this pmml model successfully. When I use jpmml-xgboost-1.3.2, I can get this field. Could you help to solve this issue? Thanks a lot.
Comparing two version pmml files:
image

Spss load model error:

07/25/2019 14:45:25.660|ERROR||||com.spss.ac.acpmml.translator.BaseTranslator.getAttributeForced(BaseTranslator.java:68)|Score error: the attribute feature is required for OutputField
com.spss.ac.accode.ACException: OutputField element missing required feature attribute.
	at com.spss.ac.acpmml.translator.BaseTranslator.getAttributeForced(BaseTranslator.java:71)
	at com.spss.ac.acpmml.translator.PMMLTranslator.handleOutputField(PMMLTranslator.java:3647)
	at com.spss.ac.acpmml.translator.PMMLTranslator.handleOutput(PMMLTranslator.java:3614)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.handleElements(MiningModelTranslator.java:347)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.parseModel(MiningModelTranslator.java:396)
	at com.spss.ac.acpmml.util.ModelFactory.dealValidModel(ModelFactory.java:490)
	at com.spss.ac.acpmml.util.ModelFactory.createModel(ModelFactory.java:447)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.handleSegment(MiningModelTranslator.java:136)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.handleSegmentation(MiningModelTranslator.java:248)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.handleElements(MiningModelTranslator.java:353)
	at com.spss.ac.acpmml.translator.MiningModelTranslator.parseModel(MiningModelTranslator.java:396)
	at com.spss.ac.acpmml.util.ModelFactory.dealValidModel(ModelFactory.java:490)
	at com.spss.ac.acpmml.util.ModelFactory.createModel(ModelFactory.java:447)
	at com.spss.ac.acpmml.util.ModelFactory.createModel(ModelFactory.java:163)

Thanks a lot. I will also attache the xgboost model, feature map and the generated pmml file.

boost_test.zip

@Ying456123
Copy link
Author

From the pmml official document (http://dmg.org/pmml/v4-3/Output.html), seems like predictedValue means select the raw predicted value. Without this feature, maybe model cannot know which value is prediction?

@vruusmann
Copy link
Member

Accoring to the PMML specification, the default value of the OutputField@feature attribute is predictedValue: http://dmg.org/pmml/v4-3/Output.html

Therefore, the following two OutputField declarations are functionally identical:

Explicit OutputField@feature="predictedValue":

<OutputField name="pred(y)" feature="predictedValue"/>

Implicit OutputField@feature="predictedValue":

<OutputField name="pred(y)"/>

TLDR: This is an SPSS bug. Both JPMML-XGBoost library versions 1.3.2 and 1.3.11 are behaving correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants