Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I trained a Custom Python model with the XGBoost code sample using the built-in env but got an error, "Coefficients are not defined for Booster type gbtree". Please find details in the attached images.
Do I need to install any package or update anything?
Operating system used: Windows 10
This is indeed a bug that is planned to be fixed in the next DSS version. In the meantime, you can use this code sample as a workaround
from sklearn.base import BaseEstimator import xgboost as xgb class DSSXGBRegressor(BaseEstimator): def __init__(self, **kwargs): self.clf = xgb.XGBRegressor(**kwargs) def fit(self, X, y): self.clf.fit(X,y) def predict(self, X): return self.clf.predict(X) def get_params(self, deep=False): return self.clf.get_params(deep) clf = DSSXGBRegressor(booster='gblinear', gamma=0, max_depth=6, min_child_weight=1)