Connect rules from Ruleset with prediction result

Hi there,

I’m wondering if KNIME is capable of visualizing (e.g. within a data table) which rule from a ruleset has been used for a value prediction.

E.g.
Attr1 | Attr2 | Attr3 | … | Predicted Column | Applied Rule

There are so many steps in that chain that are possible via nodes out of the box, e.g. extracting rules from a decision tree, creating rulesets, transform rulesets to a table, or using rulesets for prediction.

But nonetheless, I fail to configure the nodes in a way that, besides the prediction colum, also the associated rule is shown.

Does anybody know a solution for that demand?

Thanks in advance!

Dear @preiss,

Thank you for your question and welcome to the forum!

This is not possible out of the box. With a few nodes you can build this, though: This workflow demonstrates my approach: Let’s replace the Outcome column of the original rule set with a Rule ID and apply this adapted rule set. Once you have established the mapping between a data row and the Rule ID of the applied rule, you can join this table with the rules to get to the actual “content” of the rule as well as the original Outcome, i.e. the prediction.

Best regards,
Stefan

4 Likes

Thanks, Stefan - I adopted your proposal and it seems to work fine!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.