Xgboost: Convert Dmatrix Into A Numpy.array
I'd like to inspect the DMatrix object. The documentation mentions the methods to get the number of rows and columns and also the slice at each row: dmatrix.slice(index) But I'd l
Solution 1:
DMatrix is a one-way street! Once you get DMatrix, you cannot get back its content as numpy.ndarray
or pandas.DataFrame
.
[Update] A library is implemented only for the particular task of convert XGBoost's DMatrix format to numpy.array
: https://github.com/aporia-ai/dmatrix2np
Post a Comment for "Xgboost: Convert Dmatrix Into A Numpy.array"