I'm following a xgboost example on their main git at - https://github.com/dmlc/xgboost/blob/master/demo/guide-python/basic_walkthrough.py#L64
in this example they are reading files directly put into dMatrix
-
dtrain = xgb.DMatrix('../data/agaricus.txt.train')
dtest = xgb.DMatrix('../data/agaricus.txt.test')
I looked at dMatrix
code, seems there is no way to briefly look at how the data is structured - as we normally do in pandas with pandas.DataFrame.head()
in xgboost documentation it mentions that we can convert numpy.ndarray
to xgboost.dMatrix
- can we somehow convert it back - from xgboost.dMatrix
to numpy.ndarray
, or perhaps pandas dataFrame? I don't see possible way from their code - but perhaps someone knows a way?
Or is there a way to briefly look at how data is like in xgboost.dMatrix
?
Thanks in advance, Howard