dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 111 forks source link

copy predicted array so we dont overwrite used memory location #188

Closed ExpandingMan closed 11 months ago

ExpandingMan commented 11 months ago

This fixes #187

ExpandingMan commented 11 months ago

I guess in some perverse way this could technically be considered breaking as this behavior is a sort of "feature" of libxgboost, but it seems safe to say that the behavior on currnet main would be bewildering to the vast majority of users and should definitely not be the default for this wrapper.

ExpandingMan commented 11 months ago

I have added the function predict_nocopy for users who can't bear the extra allocation.

Also, instead of doing transpose we now use permutedims on the output, which is what should have been happening in the first place.