Last updated: Jan 18, 2024
The Distribution node shows the occurrence of symbolic (categorical) values, such as mortgage type or gender. Typically, you might use the Distribution node to show imbalances in the data, which you could then rectify using a Balance node before creating a model.
Example
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)
distributionnode properties |
Data type | Property description |
---|---|---|
plot
|
SelectedFields
Flags
|
|
x_field
|
field | |
color_field
|
field | Overlay field. |
normalize
|
flag | |
sort_mode
|
ByOccurence
Alphabetic
|
|
use_proportional_scale
|
flag | |
use_grid
|
boolean | Display gridlines. |