购物车属性

C&R 树节点图标分类和回归(C&R)树节点生成一个决策树,用于预测或分类未来的观测结果。 该方法使用递归分区,通过在每一步中最小化不纯度,将训练记录分成若干部分。如果树中的节点中100%的案例都属于目标字段中的特定类别,则该节点被认为是“纯净”的。 目标和输入字段可以是数字范围或分类(名义、序数或标志);所有分割都是二进制的(只有两个子组)。

示例

node = stream.createAt("cart", "My node", 200, 100)
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("target", "Drug")
node.setPropertyValue("inputs", ["Age", "BP", "Cholesterol"])
# "Build Options" tab, "Objective" panel
node.setPropertyValue("model_output_type", "InteractiveBuilder")
node.setPropertyValue("use_tree_directives", True)
node.setPropertyValue("tree_directives", """Grow Node Index 0 Children 1 2
Grow Node Index 2 Children 3 4""")
# "Build Options" tab, "Basics" panel
node.setPropertyValue("prune_tree", False)
node.setPropertyValue("use_std_err_rule", True)
node.setPropertyValue("std_err_multiplier", 3.0)
node.setPropertyValue("max_surrogates", 7)
# "Build Options" tab, "Stopping Rules" panel
node.setPropertyValue("use_percentage", True)
node.setPropertyValue("min_parent_records_pc", 5)
node.setPropertyValue("min_child_records_pc", 3)
# "Build Options" tab, "Advanced" panel
node.setPropertyValue("min_impurity", 0.0003)
node.setPropertyValue("impurity_measure", "Twoing")
# "Model Options" tab
node.setPropertyValue("use_model_name", True)
node.setPropertyValue("model_name", "Cart_Drug")
表 1。 cartnode 属性
cartnode 属性 属性描述
target 字段 C&R Tree 模型需要一个单一的目标和一个或多个输入字段。 还可以指定频率范围。 请参阅主题 公共建模节点属性 以获取更多信息。
continue_training_existing_model 标志  
objective Standard Boosting Bagging psm psm 用于非常大的数据集,需要服务器连接。
model_output_type Single InteractiveBuilder  
use_tree_directives 标志  
tree_directives 字符串 请具体说明种植树木的指示。 指令可以用三引号括起来,以避免换行或引号。 请注意,指令可能对数据或建模选项的微小变化非常敏感,并且可能无法推广到其他数据集。
use_max_depth Default Custom  
max_depth 整数 最大树深度,从0到1000。 仅在 use_max_depth = Custom 时使用。
prune_tree 标志 修剪树,避免过度生长。
use_std_err 标志 使用最大风险差异(标准误差)。
std_err_multiplier 最大差异。
max_surrogates 最大替代品。
use_percentage 标志  
min_parent_records_pc  
min_child_records_pc  
min_parent_records_abs  
min_child_records_abs  
use_costs 标志  
costs 结构化 结构化属性。
priors Data Equal Custom  
custom_priors 结构化 结构化属性。
adjust_priors 标志  
trails 增压或气袋组件型号数量。
set_ensemble_method Voting HighestProbability HighestMeanProbability 分类目标的默认组合规则。
range_ensemble_method Mean Median 连续目标的默认组合规则。
large_boost 标志 对非常大的数据集应用提升。
min_impurity  
impurity_measure Gini Twoing Ordered  
train_pct 防过盈套装。
set_random_seed 标志 复制结果选项。
seed  
calculate_variable_importance 标志  
calculate_raw_propensities 标志  
calculate_adjusted_propensities 标志  
adjusted_propensity_partition Test Validation