0 ×

Ruleset Editor

StreamableKNIME Java Snippet Nodes version 3.6.1.v201808311359 by KNIME AG, Zurich, Switzerland

Using the rules specified, it creates a PMML RuleSet model. It also applies the rules to the input table. This node takes a list of user-defined rules and tries to match them to each row in the input table. If a rule matches, its outcome value is added into a new column. The first matching rule in order of definition determines the outcome.

Each rule is represented by a line. The comments start with // in a line, and anything after that is not interpreted as a rule in that line. Rules consist of a condition part (antecedent), which must evaluate to true or false , and an outcome (consequent, after the => symbol) which is put into the new column if the rule matches.

The outcome of a rule can either be a constant string, a constant number or boolean constant. The type of the outcome column is the common super type of all possible outcomes (including the rules that can never match). If no rule matches, the outcome is a missing value.

Columns are given by their name surrounded by $, numbers are given in the usual decimal representation. Note that strings must not contain (double-)quotes.

The logical expressions can be grouped with parentheses. The precedence rules for them are the following: NOT binds most, AND, XOR and finally OR the least. Comparison operators always take precedence over logical connectives. All operators (and their names) are case-sensitive.

Some example rules (each should be in one line):

// This is a comment
$Col0$ > 0 => "Positive"
When the values in Col0 are greater than 0, we assign Positive to the result column value (if no previous rule matched).
$Col0$ = "Active" AND $Col1$ <= 5 => "Outlier"
You can combine conditions.

You can use either Ctrl+Space to insert predefined parts, or select them from the upper controls.

Options

Column List
Available columns, which can be used as variables in a rule.
Category
The operator categories.
Function
A list of valid operators in the selected category.
Description
Short help about the operator.
Expression
The rule editor. You can complete the expressions with Ctrl+Space. Each row represents a rule. The background of the line signals errors (pink), or comments (yellow). The left side of the editor can show an error icon.
Appended Column
Name of the newly appended column, which contains the outcome of the rules.
Replace Column
The column to replace

Input Ports

A table with the columns to be used in the rules.

Output Ports

The table with the rules applied.
The PMML RuleSet model.

Best Friends (Incoming)

Best Friends (Outgoing)

Workflows

Update Site

To use this node in KNIME, install KNIME Java Snippet Nodes from the following update site:

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform.