1. RuleML Telecon – Nov.27th, 2009
Degrees (of freedom)
in Uncertain Reasoning
Davide Sottara
DEIS, Faculty of Engineering, University of Bologna
40100 Bologna (BO), Italy
davide.sottara2@unibo.it
ENEA
2. Imperfect Information
Different types of “afflictions”:
Reliability (Confidence)
• E.g.: Temperature = 25° ( = 70/100)
Measures the “strength” of the estimate
(Conflicting) alternatives may be considered
Uncertainty, proper (Probability, “prior”)
Both subjective (bayesian) and objective (frequentist)
• E.g.: Temperature = 25° ( = 70%)
Temperature is expected to be (precisely) 25°
May be completely different
Vagueness (Fuzzy, “posterior”)
• E.g.: Temperature ≈ 25° ( = 0.7)
The value, e.g. 22°, is known to be “similar” to 25°.
Data known precisely, but expressed vaguely.
11/27/09 2
3. Simple Examples
rule "Bet - Fuzzy"
when
$b: Bet( $a : amount is high, $n : number )
Extraction( outcome == $n )
then
insert(new Win($a),”very high”);
end
11/27/09 3
4. Simple Examples
rule "Bet - Fuzzy"
when
rule "Bet - Probabilistic"
$b: Bet( $a : amount is high, $n : number )
when
Extraction( outcome == $n ): number )
$b: Bet( $a : amount, $n
then Extraction( outcome == $n )
insert(new Win($a),”very high”);
then
end gain = $a /
end
11/27/09 4
5. Simple Examples
rule "Bet - Fuzzy"
when
rule "Bet - Probabilistic"
$b: Bet( $a : amount is high, $n : number )
when
rule "Bet - Mixed"
Extraction( outcome == $n ): number )
$b: Bet( $a : amount, $n
when
then Extraction( outcome == $n high, $n : number )
$b: Bet( $a : amount is )
insert(new Extraction( outcome”); $n )
then neg Win($a),”very high ==
end gain = $a /
then
end ExpectedRisk r = ...
end
11/27/09 5
7. Expressing Imperfection
Damasio, Pan, Stoilos & Straccia (2008)
Different non-boolean rules can be encoded
Generalize the idea of (truth) degree
Generalize the idea of logic operator
Their work has led to fuzzyRuleML
What about Evaluation?
11/27/09 7
8. (Truth) Degrees
Different models generalize {T,F}
High order models may combine different types
Real Value [0,1]
0 1
“false” “true”
Interval [0,1]2
0 1
“false” “true”
Distribution [0,1] → [0,1] 0 1
Type II fuzzy set “false” “true”
Imprecise Distribution [0,1] → [0,1]3 0 1
Type III fuzzy set “false” “true”
11/27/09 8
9. Evaluators
Predicates are no longer “just” true (or false)
Information may come from different sources:
Facts : “a priori” information ⇒ ⇒
Embedded Evaluator
• Possibly external
Rules : chaining
Age > 18
Degrees have to be merged (∩ )
May be missing* (⊘)
May be discounted* () by confidence
May override* others ()
11/27/09 9
10. Operators
Literal and Logical Evaluators (Operators) are configurable
Implementation kind* chosen individually
• With default*
• Refined using arguments*
Bet( $a : amount is high, $n : number
Extraction( value == 3 )
amount
α ⊗ ∧ $n high isA
number Bet
value
α ⊗ =3 isA
Extract
11/27/09 10
11. Full Entailment
Generalized
α
Propagation* policy
“Propagate iff true” not suitable
β
α
⊗
β
Implication is evaluated
→
Modus Ponens is evaluated
⇒
Using Premise and Implication
11/27/09 11
12. Engine extension
Core component : Factory
Builds Degrees
Builds (coherent) Operators
Provides Propagation Policy
• PASS, HOLD, DROP
Provides Merge Strategy
• Handles missing values
• Discounts and Overrides
Attributes are passed to the factory
11/27/09 12
13. f-RuleML Attributes / 1
@degree
Applies-to : Evaluators, Operators, Rules
Value : any
Role : prior, constant value (may be merged with
other contributions)
Factory: parses the value to return a Degree
@kind
Applies-to : Operators, (Evaluators), Rules
Value : depends on logic family
Role : select the type of operator
Factory: chooses the actual implementation
11/27/09 13
14. f-RuleML Attributes / 2
@args
Applies-to : Evaluators, (Operators), (Rules)
Value : String
Role : additional initialization parameters for the
evaluator / operator
Factory: passes the String to the constructor
@default
Applies-to : Operators, Evaluators, Rules
Value : n.a.
Role : forces the default options
Factory: ignores other initialization parameters
11/27/09 14
15. Examples / 1
rule "Attr1"
when
Toss ( side == @[ degree=0.5 ] “heads”)
then
// ...
end rule "Attr2"
when
Coin( weight
< @[args=”tol=0.2,unit=g”]
10 ])
or @[ kind=”Max” ]
Dice( faces == 4)
then ... end
11/27/09 15
16. f-RuleML Attributes / 3
@id
Applies-to : Evaluators, Operators
Value : ID
Role : unique identifier.
May be used to chain rules
(i.e. a rule entails the truth of a constraint)
Factory: n.a.
@filter
Applies-to : Operators, Evaluators, Rules
Value : *
Role : selects the rule-propagation strategy
Factory: chooses the actual implementation
11/27/09 16
17. f-RuleML Attributes / 4
@boolean
Applies-to : Evaluators, Operators, Rules
Value : “true” | “false” (optional)
Role : the result is approximated with a boolean
Factory: casts the actual Degree to a Degree
modelling T (resp. F)
@crisp
Applies-to : Operators, Evaluators, Rules
Value : “true” | “false” (optional)
Role : forces the canonical evaluation
Factory: the result is cast to boolean and
propagation is halted on false
11/27/09 17
18. Examples / 2
rule "Attr3"
when
$c : Coin( )
Toss ( coin == @[ crisp] $c )
then
insert($c,”id_lucky”)
end
rule "Attr4"
when
$c : Coin( this
is @[ id=”id_lucky”] “lucky”)
then
...
end
11/27/09 18
19. f-RuleML Attributes / 5
@merge
Applies-to : Evaluators, Operators, Rules
Value : *
Role : Degree fusion strategy
Factory: chooses the actual implementation
@missing
Applies-to : Evaluators, Operators, Rules
Value : *
Role : Missing value completion strategy
Factory: chooses the actual implementation
11/27/09 19
20. f-RuleML Attributes / 5
@override
Applies-to : Evaluators, Operators, Rules
Value : *
Role : “Defeat” degree strategy
Factory: chooses the actual implementation
@discount
Applies-to : Evaluators, Operators, Rules
Value : *
Role : Confidence-based strategy
Factory: chooses the actual implementation
11/27/09 20
21. Examples / 3
rule "Attr5"
when
Toss( side == “heads”,
this
is @[ degree=”[0.4,0.6]”,
merge=”Intersect”,
missing=”OWA” ]
“probable” )
then
...
end
11/27/09 21
23. Conclusions
f-RuleML supports Imperfect Rules:
Rules define the abstract constraints
Attributes specify the concrete semantics
Evaluation requires more customizations
Additional attributes can be used
Different logics can be used by setting the
default values appropriately
Individual rules can override them
11/27/09 23