0

我已经训练了这个模型:

model = XGBClassifier( #XGBClassifier
    objective='binary:logistic',
    base_score=0.5, 
    booster='gbtree', 
    colsample_bylevel=1,
    colsample_bynode=1, 
    colsample_bytree=1,
    enable_categorical=False, 
    gamma=2, 
    gpu_id=-1,
    importance_type=None, 
    interaction_constraints='',
    learning_rate=0.1, 
    max_delta_step=0,
    max_depth=3,
    min_child_weight=7, 
    monotone_constraints='(1,1,1,1,1)',
    n_jobs=1, 
    nthread=1, 
    num_parallel_tree=1,
    predictor='auto',
    random_state=0, 
    reg_alpha=0, 
    reg_lambda=1,
    scale_pos_weight=1, 
    silent=True, 
    subsample=0.8,
    tree_method='exact',
    validate_parameters=1, 
    pred_contribs=True,  
    verbose=True)
    
    
model.fit(X, Y)

X 数据框有 5 个预测特征。有没有办法通过编辑 XGBClassifier 代码中的参数来防止这 5 个功能相互交互?

4

0 回答 0