I trained an XGBoost model with default hyper-parameters on a trivial data set (see attached code) and then used
to create a daal model.
My XGBoost model worked fine but the daal model was useless!
|y_train||xgb - y_train||daal - y_train|
Any idea what is wrong with the (short) attached code (or the environment)?
Steps to reproduce:
It turns out that the DAAL model uses a permutation of the features. If I train XGBoost on ["X1", "X2"] I need to feed the DAAL model ["X2", "X1"]. I figured it out after coming across this thread which also suggests:
Additionally, calling .dump_model() on both your Python and C++ model objects will yield the same Decision Trees, but the Python one will have all the feature names and the C++ one will likely have f0, f1, f2, .... You can compare these two to get your actual column ordering, and then your predictions will match across languages(Not entirely, b/c of rounding).
Thank you for posting in Intel Communities.
Glad to know that your issue is resolved. Thanks for sharing the solution with us. Can we close this case?