Arden Syntax:Fuzzy Arden Syntax
Introduction
The principal change of version 2.9 is the introduction of support for fuzzy logic. Fuzzy logic is a multi-valued logic that has gained use in formal decision-making because of its value in representing reasoning involving imprecision. Unlike the typical binary (true-false) logic that continues to be supported in this version of the Arden Syntax, fuzzy logic incorporates degrees of truth or set membership (Steimann F. On the use and usefulness of fuzzy sets in medical AI . Artif Intell Med 2001;21:131-7). Clinical practice guidelines and other forms of clinical knowledge representation may employ fuzzy logic, using linguistic variables such as "severe" and "somewhat" without necessarily formally defining them or providing an objective quantification. These changes in the Arden Syntax allow fuzzy logic to be formally represented, thus supporting the representation of clinical guidelines and clinical reasoning generally.
FAQ
- Question: On the example fuzzy set on page 35-36 (TwotoThree := fuzzy set (2, 0), (2, 1), (2, 1), (3, 1), (3, 0);). Why did (2, 1) come twice time?
- Answer: The first fuzzy set on page 36 is this
TwotoThree := fuzzy set (2, 0), (2, 1), (2, 1), (3, 1), (3,0);
At point 2 there is a "discontinuity point" which means that if we approaching 2 from the left side we have the membership value 0, while approaching 2 from the right side we have the membership value 1. The question is which membership value is assigned to 2. The document contains the sentence "The first assignment is the value at that point, unless the second one appears twice.".
This means in the above example (fuzzy set TwotoThree) the membership value at point 2 is 1, since the (2, 1) appears twice.
If we adjust the fuzzy set to
TwotoThree := fuzzy set (2, 0), (2, 1), (3, 1), (3,0);
the membership value at the point 2 is 0.
- Answer: The first fuzzy set on page 36 is this
- Question: Could you provide some examples for using IF-THEN-ELSE(-AGGREGATE) (see section 10.2.2.*) and the expected output?
- Answer: Please see examples below for more information.
EXAMPLES
"Classic" example using a boolean
Logic: Var := 0; Bool_true := true; Con := truth value 0.2; If Bool_true then Var := Var + 1; Else Var := Var + 3; Endif CONCLUDE TRUE; Action: WRITE Var;
expected output:
3 <applicability=1>
Example using a truth value
Logic: Var := 0; Bool_true := true; Con := truth value 0.2; If Con then Var := Var + 1; Else Var := Var + 3; Endif CONCLUDE TRUE; Action: WRITE Var;
The MLM execution branches at the IF statement and all following expressions are executed twice (in parallel) up to the end of the MLM.
expected output:
1 <applicability=0.2>
3 <applicability=0.8>
Example using a truth value with AGGREGATE
Logic: Var := 0; Bool_true := true; Con := truth value 0.2; If Con then Var := Var + 1; Else Var := Var + 3; Endif AGGREGATE CONCLUDE TRUE; Action: WRITE Var;
The MLM execution branches at the IF statement and the expressions in the THEN and ELSE branch are executed in parallel. When execution reaches the ENDIF AGGREGATE statement the aggregated value of Var is calculated. This is done as described in the specification by "Otherwise, if Var is defined in all branches and of the same simple data type except string, the
contents are aggregated according to their weighted middle.".
Therefore, after the ENDIF AGGREGATE statement Var has the value (0.2*1 + 0.8*3) / (0.2 + 0.8) = 2.6.
expected output:
2.6 <applicability=1>
Example using truth values with nested IF . . . ELSE statements
Logic: Var := 0; Bool_true := true; Con := truth value 0.2; If Con then Var := Var + 1; If con_second then Var := Var + 1; Else Var := Var + 3; Endif Else Var := Var + 3; Endif CONCLUDE TRUE; Action: WRITE Var;
As above, the MLM execution splits into 2 branches on the first IF statement. The second IF statement branches the first branch again into 2 separate executions. Those 3 Branches are executed in parallel.
expected output:
2 <applicability=0.06> (THEN->THEN)
4 <applicability=0.14> (THEN->ELSE)
3 <applicability=0.8> (ELSE)
Please note that the sum of all applicabilities of a variable is 1.
How is the CONCLUDE statement handled in parallel processing?
Logic: Var := 0; Bool_true := true; Con := truth value 0.2; If Con then Var := Var + 1; CONCLUDE FALSE; Else Var := Var + 3; Endif CONCLUDE TRUE; Action: WRITE Var;
As specified, the CONCLUDE statement stops the execution of the MLM. That means, the affected branch of execution is stopped. The other one is executed until the end of the MLM.
expected output:
3 <applicability=0.8>