Coder Social home page Coder Social logo

xgb2cpp's People

Contributors

drag0 avatar popcorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xgb2cpp's Issues

XGBRegression gives constant difference

Hello,
thanks for the code, helped a lot!
I tried XGBRegressor but it constantly less around 0.5 than python predictions

I checked dump_raw.txt vs xgb_regressor.cpp numbers have same decimals, so it shouldn't be a problem

Do you have any idea why?

Wrong feature indices from dump.raw.

your regular expression seems not to get the right feature, instead it uses the note id.

feature_index = re.search('[^f]', level[0]).group(0)

which should be:

feature_index = re.search('f(\d+)', level[0]).group(1)

to use the feature index from sample.

how to use the code

Dear Sir,
I am working on a project using xgboost, which I have to use c++ code. Your idea is really awesome. Thank you! I trained a model(classification of 0 and 1) with a medical dataset and tested with a piece of specific sample. I'v got a negative result(0). I dumped the model and used your code to generate a cpp code. Then I got two possibilities of 0.44 and 0.55. The results seem not the same if I understand it correctly.

From what I know, the model is a number of trees. And the sample goes through them. Normally I will get only one number? How does it give me two numbers, and possibilities based on them?

best wishes,
Jako

Please add a License

If I didn't miss something, there is no license specified for the code in this repository. Legally, this means that no one (except you, of course) is allowed to use it in any way.
As you put it on GitHub, I assume that this is not your intention. So to give users more certainty how they can use this script, it would be great if you could add some license. If you are not sure, which license to choose, this site may help: https://choosealicense.com

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.