简体   繁体   English

在决策树上更改目标函数

[英]Change Objective function on Decision tree

I'm trying to build a binary decision tree and only selecting nodes with a concentration of 75% (or greater) of target (Yes vs. No) 我正在尝试构建二元决策树,并且仅选择目标浓度为75%(或更高)的节点(是vs.否)

Only those whose nodes with 75% or greater will get the treatment. 只有那些结点大于或等于75%的人才能得到治疗。

Is there a method to change the decision tree objective to maximize the number of observations with at least 75% Yes (or some other number)? 是否有一种方法可以更改决策树目标,以使观察数量最大化(至少75%是)(或其他数量)?

I can mock up some code if that would help. 如果可以的话,我可以模拟一些代码。

Do you want your decision tree to predict an outcome being greater than 75%? 您是否希望决策树预测结果大于75%? If so, create a column that is true when the target column is >.75 and use that column as the outcome 如果是这样,请在目标列>.75时创建一个为true的列,并将该列用作结果

df$newOutcome <- df$oldOutcome > .75

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM