I have been struggling to get python's xgboost to accept targets due to their shape (I have tried shapes of (-1,1) vs (-1,), format of pandas vs numpy, and LabelBinarizing vs One-hot-encoding the target). Any advice to get this going?
import numpy as np
x = np.random.randint(0, 25, size = (1000, 10))
y = np.random.randint(0, 5, size = (1000, 1))
clf = xgb.XGBClassifier()
x = xgb.DMatrix(x)
y = xgb.DMatrix(y)
clf.fit(x, y)
ValueError: bad input shape ()