popcorn / xgb2cpp Goto Github PK
View Code? Open in Web Editor NEWConverts XGBoost raw model dumps to C++ code.
License: MIT License
Converts XGBoost raw model dumps to C++ code.
License: MIT License
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?
Hi Sir,
Does the code also workable for XGBRegression? Can you add a regression version?
Best Wishes,
Chen
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.