0 / 0
matrixnode properties

matrixnode properties

Matrix node iconThe Matrix node creates a table that shows relationships between fields. It's most commonly used to show the relationship between two symbolic fields, but it can also show relationships between flag fields or numeric fields.

Example

stream = modeler.script.stream()
sourcenode = stream.findByID("id46WRP1285C")
node = stream.create("matrix", "My node")
# "Settings" tab
node.setPropertyValue("fields", "Numerics")
node.setPropertyValue("row", "K")
node.setPropertyValue("column", "Na")
node.setPropertyValue("cell_contents", "Function")
node.setPropertyValue("function_field", "Age")
node.setPropertyValue("function", "Sum")
# "Appearance" tab
node.setPropertyValue("sort_mode", "Ascending")
node.setPropertyValue("highlight_top", 1)
node.setPropertyValue("highlight_bottom", 5)
node.setPropertyValue("display", ["Counts", "Expected", "Residuals"])
node.setPropertyValue("include_totals", True)

stream.link(sourcenode, node)
Table 1. matrixnode properties
matrixnode properties Data type Property description
fields Selected Flags Numerics  
row field  
column field  
include_missing_values flag Specifies whether user-missing (blank) and system missing (null) values are included in the row and column output.
cell_contents CrossTabs Function  
function_field string  
function Sum Mean Min Max SDev  
sort_mode Unsorted Ascending Descending  
highlight_top number If non-zero, then true.
highlight_bottom number If non-zero, then true.
display [Counts Expected Residuals RowPct ColumnPct TotalPct]  
include_totals flag  
use_output_name flag Specifies whether a custom output name is used.
output_name string If use_output_name is true, specifies the name to use.
output_mode Screen File Used to specify target location for output generated from the output node.
output_format Formatted (.tab) Delimited (.csv) HTML (.html) Output (.cou) Used to specify the type of output. Both the Formatted and Delimited formats can take the modifier transposed, which transposes the rows and columns in the table.
paginate_output flag When the output_format is HTML, causes the output to be separated into pages.
lines_per_page number When used with paginate_output, specifies the lines per page of output.
full_filename string  
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more