SlideShare a Scribd company logo
1 of 23
Download to read offline
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
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
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
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
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
vs
            Benefits                            Drawbacks

 Robustness                            Complexity
       Handle Inaccurate inputs            In writing rules
       Avoid arbitrary thresholds          In evaluating rules



 Convenience                           Coherence
       Knowledge is rarely precise         Maintain soundness



 Conciseness
       Compact expressions




11/27/09                                                           6
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
(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
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
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
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
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
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
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
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
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
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
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
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
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
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
Work–in–progress
 Extending RETE:




                                                 Evaluator
                                                  (@kind,
                                 @id              @args)



                                       @filter
                        ∩,,⊘
                     Degree[ ]
11/27/09                                                22
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

More Related Content

Viewers also liked

One Piece 569
One Piece 569One Piece 569
One Piece 569Elfam
 
Earth Science Multi-Q
Earth Science Multi-QEarth Science Multi-Q
Earth Science Multi-Qdmix333
 
Week1 Interactivity
Week1 InteractivityWeek1 Interactivity
Week1 InteractivityCMoz
 
Romanian questionnaire 5 8-2011
Romanian questionnaire 5 8-2011Romanian questionnaire 5 8-2011
Romanian questionnaire 5 8-2011Petros Michailidis
 
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...kay91
 
The use of Orfeo Toolbox in the context of map updating
The use of Orfeo Toolbox in the context of map updatingThe use of Orfeo Toolbox in the context of map updating
The use of Orfeo Toolbox in the context of map updatingmelaneum
 
Twidiko 1 — Slideshare
Twidiko 1 — SlideshareTwidiko 1 — Slideshare
Twidiko 1 — Slidesharesvetlichny
 
Jeux Olympiques 2010
Jeux Olympiques 2010Jeux Olympiques 2010
Jeux Olympiques 2010moclyn
 
One Piece 568
One Piece 568One Piece 568
One Piece 568Elfam
 
How and why google failed and its future
How and why google failed and its futureHow and why google failed and its future
How and why google failed and its futureWP HOLD
 
Gevanim
GevanimGevanim
Gevanimrel10
 
Re Content And Platform Summaries 1118
Re Content And Platform Summaries 1118Re Content And Platform Summaries 1118
Re Content And Platform Summaries 1118bking1
 

Viewers also liked (18)

Education Change
Education  ChangeEducation  Change
Education Change
 
titulo
titulotitulo
titulo
 
Youngs
YoungsYoungs
Youngs
 
One Piece 569
One Piece 569One Piece 569
One Piece 569
 
Earth Science Multi-Q
Earth Science Multi-QEarth Science Multi-Q
Earth Science Multi-Q
 
Week1 Interactivity
Week1 InteractivityWeek1 Interactivity
Week1 Interactivity
 
Greek survey's Graphs 10 14
Greek survey's Graphs 10 14Greek survey's Graphs 10 14
Greek survey's Graphs 10 14
 
Romanian questionnaire 5 8-2011
Romanian questionnaire 5 8-2011Romanian questionnaire 5 8-2011
Romanian questionnaire 5 8-2011
 
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...
U:\My Documents\Media\A2\Powerpoints\Production Power Points\Research Into Sh...
 
My Portfolio
My PortfolioMy Portfolio
My Portfolio
 
Iif 4ºC
Iif 4ºCIif 4ºC
Iif 4ºC
 
The use of Orfeo Toolbox in the context of map updating
The use of Orfeo Toolbox in the context of map updatingThe use of Orfeo Toolbox in the context of map updating
The use of Orfeo Toolbox in the context of map updating
 
Twidiko 1 — Slideshare
Twidiko 1 — SlideshareTwidiko 1 — Slideshare
Twidiko 1 — Slideshare
 
Jeux Olympiques 2010
Jeux Olympiques 2010Jeux Olympiques 2010
Jeux Olympiques 2010
 
One Piece 568
One Piece 568One Piece 568
One Piece 568
 
How and why google failed and its future
How and why google failed and its futureHow and why google failed and its future
How and why google failed and its future
 
Gevanim
GevanimGevanim
Gevanim
 
Re Content And Platform Summaries 1118
Re Content And Platform Summaries 1118Re Content And Platform Summaries 1118
Re Content And Platform Summaries 1118
 

Recently uploaded

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Degrees (of freedom) in uncertain reasoning

  • 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
  • 6. vs Benefits Drawbacks  Robustness  Complexity  Handle Inaccurate inputs  In writing rules  Avoid arbitrary thresholds  In evaluating rules  Convenience  Coherence  Knowledge is rarely precise  Maintain soundness  Conciseness  Compact expressions 11/27/09 6
  • 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
  • 22. Work–in–progress  Extending RETE: Evaluator (@kind, @id @args) @filter ∩,,⊘ Degree[ ] 11/27/09 22
  • 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