dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 110 forks source link

Prediction #108

Closed NC-Elbow closed 1 year ago

NC-Elbow commented 2 years ago

XGBoost seems to not have a prediction in julia 1.7

pred = predict(bst, test_X) pred = predict(bst, dtest)
both return (test_X and dtest are defined and work exactly as expected) UndefVarError: predict not defined.

bst.predict(test_X) bst.predict(dtest) both return ERROR: type Booster has no field predict

kpa28-git commented 2 years ago

I did find though that I had to do XGBoost.predict(...)for the method to resolve properly. I don't know why, predict is exported properly so predict(...)should work.

The sexond one is the wrong syntax wrong for julia, should be predict(bst, test_X), the Booster type doesn't have a function field called predict.

ExpandingMan commented 1 year ago

predict is exported in 2.0.