distributionnode 属性

分发节点图标“分布”节点显示符号(分类)值(例如抵押类型或性别)的出现次数。 通常,您可以使用“分布”节点来显示数据中的不平衡,然后可以在创建模型前使用“均衡”节点来纠正此类不均衡。

示例

stream = modeler.script.stream()
typenode = stream.findByID("id42KW3MSA94B")

node = stream.create("distribution", "My node")
stream.link(typenode, node)

# "Plot" tab
node.setPropertyValue("plot", "Flags")
node.setPropertyValue("x_field", "Age")
node.setPropertyValue("color_field", "Drug")
node.setPropertyValue("normalize", True)
node.setPropertyValue("sort_mode", "ByOccurence")
node.setPropertyValue("use_proportional_scale", True)
表1. 分布式节点属性
distributionnode 个属性 数据类型 属性描述
plot SelectedFields Flags  
x_field 字段  
color_field 字段 重叠字段。
normalize 标志  
sort_mode ByOccurence Alphabetic  
use_proportional_scale 标志  
use_grid BOOLEAN 显示网格线。