thundergbm
thundergbm copied to clipboard
How to support multiple output y
The sklearn
support for muliple output, i.e. the shape of y can be (B,L) rather than (B,)
For example,
from sklearn.ensemble import RandomForestRegressor
x_train = np.random.randn(100,100)
y_train = np.random.randn(100,50)
rfr = RandomForestRegressor(n_estimators=20,n_jobs=1)
rfr.fit(x_train, y_train)
But here, for thundergbm
, if we use multiple y, we get
rfr = TGBMRegressor(256)
rfr.fit(x_train, y_train)
--> 797 raise ValueError("bad input shape {0}".format(shape))
798
799
ValueError: bad input shape (2000, 200)
I notice the source code using sklearn.utils.check_X_y
and turn on the option 'multi_output=True'
The there goes wrong for your fit
function at set(y)
part.
How do we use multiple output y
ThunderGBM currently doesn't support multiple output, but we would definitely consider supporting this feature in the future upgrade.