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

Required attribute Node@score is not defined error #201

Closed
rahuls04 opened this issue Jul 22, 2020 · 7 comments
Closed

Required attribute Node@score is not defined error #201

rahuls04 opened this issue Jul 22, 2020 · 7 comments

Comments

@rahuls04
Copy link

I am trying to move from a logistic regression model to xgboost. However, when I run my test cases on my new xgboost PMML I get the following error - org.jpmml.evaluator.MissingAttributeException: Required attribute Node@score is not defined

Possible solutions?

@vruusmann
Copy link
Member

Required attribute Node@score is not defined

Possible solutions?

Perhaps you should add Node@score attributes to all terminal (aka leaf) Node elements?

Where did you get this XGBoost PMML file? Was it generated using JPMML-XGBoost?

@rahuls04
Copy link
Author

The xgboost pmml file was generated using the R pmml package

@rahuls04
Copy link
Author

I do have Node score attributes at my leaf nodes like so -
image

@vruusmann
Copy link
Member

The xgboost pmml file was generated using the R pmml package

It's probably incorrect/invalid then.

According to the PMML specification, the Node@score attribute is required.

Quoting http://dmg.org/pmml/v4-3/TreeModel.html: "it is the model provider's responsibility to make sure that it is not possible that the scoring process ends in a Node which does not have a score attribute. This includes scenarios with missing values where the final Node is not necessarily a leaf node."

@vruusmann
Copy link
Member

The xgboost pmml file was generated using the R pmml package

Please re-export your xgboost model using the R2PMML package. The generated PMML file will be about 50% smaller, and correct.

@rahuls04
Copy link
Author

Does the R2pmml package support complex feature transforms?

@vruusmann
Copy link
Member

Does the R2pmml package support complex feature transforms?

Depends.

But what good are those complex feature transforms of the R pmml package, if the final model is incorrectly encoded?

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