Comments (2)
Yikes, that must have been confusing. libxgboost
returns a pointer to us on predict
and apparently it is using the same memory location, which is clearly not something we considered when writing this wrapper.
The only way around this, unfortunately, is to copy the entire output array, but it seems pretty obvious that that should be the default behavior, and it's implemented in #188.
In that PR I have added the (unexported) function predict_nocopy
for users who don't want the extra allocation.
from xgboost.jl.
Awesome, thanks for the quick fix! And your fix was exactly my work-around: just copy
.
It did take me a good hour or so to figure out why my results looked funny, but I'm glad I was able to track it down and hopefully prevent headache for someone else down the line.
from xgboost.jl.
Related Issues (20)
- Huge import latency caused by `Term`, `GPUArrays`, and `CUDA` HOT 17
- Package now requires a Julia built with GPL libraries enabled HOT 2
- early_stopping_rounds? HOT 18
- what is the role of sparse `DMatrix` constructors? HOT 24
- Can not reduce verbosity HOT 4
- Classification: Support multiple metrics HOT 9
- XGBoost rewrite on Julia using Metal.jl HOT 8
- question on XGBoost_jll HOT 3
- TreeSHAP, libxgboost, and implications for predict function HOT 10
- Update term.jl dependency HOT 3
- Add GPU tests with buildkite
- Quick question on Custom objective HOT 3
- xgboost failing with julia 1.8.5 HOT 22
- issue finding libomp popped up after updating environment HOT 1
- xgboost fails to find libxgboost HOT 13
- Watchlist error HOT 1
- Saving and Loading Boosters HOT 13
- Precompile fails on Julia 1.10 HOT 5
- Saving and reloading boosters using IOBuffer HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xgboost.jl.