Hub
Pricing About
NodeNode / Learner

Ruleset Editor

ManipulationPMMLStreamable
Drag & drop
Like

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. To add comments, start a line with // (comments can not be placed in the same line as a rule). Anything after // will not be interpreted as a rule. 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.

Node details

Input ports
  1. Type: Table
    Table
    A table with the columns to be used in the rules.
Output ports
  1. Type: Table
    Classified values
    The table with the rules applied.
  2. Type: PMML
    RuleSet model
    The PMML RuleSet model.

Extension

The Ruleset Editor node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits