SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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
 

Dernier

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Dernier (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

RuleML Telecon – Nov.27th, 2009 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