我在XGBoost中有一个模型,该模型建立在包含10万个样本和70个特征的数据集上。目标='binary:logistic'。
我想将结果可视化为附件中的图片:1)用2D图形散布的数据,2)逻辑线,将数据分为1类或0类,3)和阈值-模型敏感度。 logistic regression picture
# create and train model
bst = xgb.train(param,
dtrain,
num_boost_round = best_iteration)
# model parameters
num_parallel_tree = 1 # default value
subsample = 1 # default value
colsample_bytree = 0.4
objective = 'binary:logistic'
learning_rate = 0.05
eval_metric = 'auc'
max_depth = 10
min_child_weight = 4
n_estimators = 5000
seed = 7
将来,将找到一个逻辑回归参数来调节模型的敏感性-即上下移动阈值(一会儿,我通过增加colsample_by_tree,max_depth,num_trees,子样本来调节模型敏感性),但在我看来,这是不正确的。