Giter VIP home page Giter VIP logo

Comments (3)

vruusmann avatar vruusmann commented on July 19, 2024

Looks like you've trained an XGBoost model, which contains no-op nodes.

The JPMML-XGBoost automatically tries to eliminate those nodes (because they are provably unreachable under any and all scenarios) by applying a special tree model pruning algorithm implementes as org.jpmml.converter.visitors.TreeModelPruner.

I was sure that the tree pruning code will always succeed. However, you've managed to train an XGBoost model that contains such an unusual "internal structure" that the tree pruning code still fails.

Can you share your model file so that I could take a look at this unusual "internal structure" myself? Or if it's trained on proprietary data, can you reproduce the pruning error using some publicly available toy dataset?

from jpmml-converter.

vruusmann avatar vruusmann commented on July 19, 2024

As a workaround, you should dsable tree pruning by specifying the prune = False conversion option:

pipeline = PMMLPipeline([
  ("xgb", XGBClassifier())
])
pipeline.fit(X, y)
# THIS - specify conversion options right after fitting the pipeline
pipeline.configure(prune = False)

sklearn2pmml(pipeline, "XGBoost.pmml")

from jpmml-converter.

xiaoqiao21 avatar xiaoqiao21 commented on July 19, 2024

Thanks a lot! It works now

from jpmml-converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.