Multiple Outcomes given

Multiple Outcomes Given

This Article shows the various patterns for Outcomes as well as provides a breakdown of individual outcomes that contribute to an overall result with their individual certainties.

When working with Rainbird maps that provide a single answer with an associated certainty, it is often desirable to see a breakdown of single outcomes that contribute to that overall result. 

What problem/context does it address?

When Rainbird provides an answer with an associated certainty value, the overall certainty percentage is a combination of multiple smaller percentages. 

By default, Rainbird will only show the final result(s), and not the information and decisions that went into reaching a result. This information can be viewed in the evidence tree; however, this is not always appropriate for end-users. 

This build pattern can display multiple results: the primary outcome, plus the sub-outcomes including associated certainties.

Figure 1: Setting the Relationship on plural shows all Rule outcomes

Applicability

Use this pattern when:

  • You have a Rainbird map where there is a single answer with an associated certainty value, and you want to display a breakdown of how that final result and certainty have been reached, without needing to refer to the evidence tree
  • Your Rainbird map comes out with a single answer with no certainty, and you want to display supporting decisions that have contributed to that final answer.

Limitations

This build pattern will not work if the Rainbird map has to provide multiple results in certainty order.

Elements (generic description, linked to other library content)

Make sure you are familiar with the following:

When viewing the map generated by the RBLang at the bottom of the article, for a demonstration of the hoursBetween function, please run the query on the ‘how many hours till new year’ relationship.

We continue the build from the ‘Building the Map’ section above, where we created ConceptsRelationships, InstanceFacts and Rules.

In this section, we create the individual Based on Rules who contribute to an overall decision, as well as the overall outcome taking all individual outcomes into consideration.

The Rules added to the below Relationships have the Minimum rule certainty (under Advanced) set to ‘1’, guaranteeing a result for each rule.

  • %APPLICANT presents risk of claim due to location Risk of claim
    On condition that

Multiple Outcomes Given R1

Figure 8: Create Rules on individual Outcome Location

  • %APPLICANT presents risk of claim due to age bracket Risk of claim
    On condition that:
    Multiple Outcomes R2

Figure 9: Create Rules on individual Outcome Age

  • Followed by 3 Number Bracket Rules on the relationship:
  • %APPLICANT presents risk of claim due to mileage Risk of claim
    On condition that:

Multiple Outcomes Given R3

Multiple Outcomes Given R4

Multiple Outcomes Given R5

Figure 10: Create Rules on individual Outcome Mileage Bracket

Finally build object-specific rules for each of the rules, referring to the relevant sub-rule.

Those conditions are:

Figure 11: Building the overall rule

By running all four rules on the plural relationship,

Figure 12: Build the Overall Outcome Rule

When running the Rainbird map, we will see four outcomes, displaing both the overall result, plus each of the three individual sub-results that contribute to the overall result.

Multiple Outcomes Given V

Figure 13: Query and Multiple Outcomes

Note: that one downside of this technique is that the overall result will not be displayed first. As the overall result is an average of the sub-results, it will have a certainty percentage, lower than some sub-results and higher than others. Rainbird orders the outcomes in certainty order, from highest to lowest.

Click on the ‘Export.rbird’ button to download the ‘Multiple Outcomes Given’ map used in this example. The knowledge map can then be imported into your Rainbird Studio

Query and Results

The main query is built on the rule ‘has risk of claim overall’. The outcome of the query will be the Object we defined.

Article Feedback form
Did you find this article useful?

Version 1.01 – Last Update: 26/02/2021