Exemplo n.º 1
0
 def __init__(
     self,
     n_estimators=100,
     subsample=1,
     colsample_bytree=1,
     colsample_bylevel=1,
     min_child_weight=1,
     gamma=0,
     reg_lambda=1,
     max_depth=4,
     log_learning_rate=-1,
     missing=None
 ):
     XGBRegressor.__init__(
         self,
         objective='reg:linear',
         n_estimators=int(max(1, n_estimators)),
         subsample=subsample,
         colsample_bytree=colsample_bytree,
         colsample_bylevel=colsample_bylevel,
         min_child_weight=int(max(1, min_child_weight)),
         gamma=gamma,
         reg_lambda=reg_lambda,
         max_depth=int(max(1, max_depth)),
         learning_rate=10 ** log_learning_rate,
         missing=missing
     )