SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
Machine Learning:
         Inductive Logic Programming
                         Dr Valentina Plekhanova
                        University of Sunderland, UK




                        Formalisms in Inductive Learning


    Learning the attribute descriptions, e.g. Decision Tree
                           descriptions,
    Learning the first-order relational descriptions, e.g. ILP
                 first-




Valentina Plekhanova           Machine Learning: ILP             2




                                              ILP: a Framework


•   Theoretical Setting: Inductive Logic Programming
                Setting:
•   Task: Concept Learning
    Task:
•   Methods: Inductive Leaning
    Methods:
•   Algorithms: FOIL
    Algorithms:




Valentina Plekhanova           Machine Learning: ILP             3




                                                                     1
Inductive Logic Programming


  Inductive Logic Programming ILP = I ∩ LP , where I stands
  for induction in machine learning, LP stands for logic
  programming.




Valentina Plekhanova       Machine Learning: ILP                4




                          Inductive Concept Learning:
                                            Definition
  Given a set E of positive and negative examples of concept C ,
  find a hypothesis H , expressed in a given concept description
  language L , such that
     every positive example ε ∈ Ε +           is covered by H
                               −
     no negative examples ε ∈ Ε are covered by H
      ( H is "complete and consistent").




Valentina Plekhanova       Machine Learning: ILP                5




                         Inductive Logic Programming:
                                             a Method
    Reminder: Induction means reasoning from specific
    Reminder:
   to general.
   In the case of inductive leaning from examples, the
   learner is given some examples from which general
   rules or a theory underplaying the examples are
   derived.
   Inductive inference can involve the use of
   background knowledge to construct a hypothesis
   which agrees with some set of examples according to
   relationship.
   relationship.

Valentina Plekhanova       Machine Learning: ILP                6




                                                                    2
Definitions
 Clause - component of a (complex) sentence, with its own
 subject and predicate.
       Predicate - part of a statement which says something about
       the subject ,e.g. "is short" in "Life is short".
                         "is short" "Life short".
       Subject - (contrasted with predicate) word(s) in a sentence
       about which something is predicated (contrasted with
       object), e.g. Life.
                     Life.
 Inference - process of inferring - to get conclusion or to reach
 an option from facts or reasoning.


Valentina Plekhanova               Machine Learning: ILP                         7




                                                                         ILP
In an ILP problem the task is to define, from given examples, an
unknown relation (i.e. the target predicate) in terms of (itself
and) known relations from background knowledge.
In ILP, the training examples, the background knowledge and
                     examples,
the induced hypotheses are all expressed in a logic program
form, with additional restrictions imposed on each of the three
languages.
languages.
For example, training examples are typically represented as
ground facts of the target predicate, and most often background
knowledge is restricted to be of the same form.


Valentina Plekhanova               Machine Learning: ILP                         8




                              First-Order Predicate Logic
                              First-
- formal framework for describing and reasoning about objects, their parts,
and relations among the objects and/or the parts. An important subset of first-
order logic is Horn clauses: grandparent (X,Y) ← parent (X, Z), parent (Z,Y)
 where
 grandparent (X,Y) - head of clause or postcondition,
 parent (X, Z), parent (Z,Y) - body of clause or precondition,

 grandparent, parent - predicates; a Literal is any predicate or its negation,
  (X,Y), (X,Z), (Z,Y) - arguments,
                 X, Y, Z - variables,
comma between predicates means "conjunction", ← means
                       IF (body of clause) THEN (head of clause )

Valentina Plekhanova               Machine Learning: ILP                         9




                                                                                     3
Reasons for ILP
 Any sets of first-order Horn clauses can be interpreted as
 programs in the logic programming language PROLOG, so
 learning them (Horn clauses) is often called inductive logic
 programming (ILP).
 ILP is very convenient learning because there are two reasons:
   ILP is based on the sets of IF-THEN rules (logic) - one of the
 most expressive and human readable representations for learned
 hypotheses.
   ILP can be viewed as automatically inferring PROLOG
 programs from examples. PROLOG is a programming language
 in which programs are expressed as collections of Horn clauses.
Valentina Plekhanova                  Machine Learning: ILP                          10




                                  ILP Problem: an Example

   • Illustration of the ILP task on a simple problem of learning
     family relations.
   • Example – an ILP Problem
   • The task is to define the target relation daughter (x,y) which
     states that person x is a daughter of person y, in terms of the
     background knowledge relations female and parent.
                                                    parent.
   • These relations are given in the following table.
   • There are two positive ⊕ and two negative Θ examples
     of the target relation.



Valentina Plekhanova                  Machine Learning: ILP                          11




                                              A Simple ILP Problem:
                                      Learning the daughter Relation
  Training Examples                Background Knowledge           Background Knowledge


  daughter (mary, ann)      ⊕      parent (ann, mary)             female(ann)



  daughter (eve, tom)              parent (ann, tom)              female(mary)
                            ⊕

  daughter (tom, ann)
                            Θ      parent (tom, eve)              female(eve)



  daughter (eve, ann)
                            Θ      parent (tom, ian)




In the hypothesis language of Horn clauses it is possible to formulate the
                                                             formulate
following definition of target relation:
                         daughter (x,y)          female (x), parent (y,x)
Valentina Plekhanova                  Machine Learning: ILP                          12




                                                                                          4
INPUT: B, E+, E-, H=∅
    R = p(X1,…,Xn) ←                                          FOIL Algorithm
    WHILE E+≠ ∅ DO
          WHILE There are examples in E – , i.e. ∃ e ∈ E - ,
          i.e. that are still covered by H∪ {R}        DO
          find the best Literal L (via FOIL_Gain) to add this Literal L to R
                                       FOIL_Gain)
          R =R←L
          E - = E -  {e ∈ E- | that does not satisfy R }
          END

    H = H ∪ {R}
    E+ = E+  {e ∈ E + | H}
     i.e. {The examples in E+ , that are covered by B, are removed}
    END
OUTPUT: H


 Valentina Plekhanova                 Machine Learning: ILP                               13




                                                              FOIL Algorithm
   Consider some rule R, and a candidate literal L that might be
   added to the body of R. Let R′ be the new rule created by adding
   literal L to R.
   The value Foil_Gain (L, R) of adding L to R is defined as
      Foil_Gain (L, R)=t { log2 [p1 / (p1+n1)]-log2 [p0 / (p0+n0)] }
                                            )]-
   where p0 is the number of positive bindings of rule R, n0 is the
   number of negative bindings of R, p1 and n1 - for rule R′.
   t is the number of positive bindings of rule R that are still
   covered after adding literal L to R. Foil_Gain value has an
   interpretation in terms of information theory ( -log2[p0 /(p0+n0)]
   is the entropy).
 Valentina Plekhanova                 Machine Learning: ILP                               14




                                   FOIL Algorithm: an Example
  Rule1: daughter (X,Y) ←
  T1: (Mary, Ann) +                p1 = 2                            L1 = female (X)
      (Eve, Tom)     +             n1 = 2                            Foil_Gain_L1 = …
                                                                     Foil_Gain_L
      (Tom, Ann)     -              t1 = …                            L2 = parent (Y,X)
      (Eve, Ann)     -                                                Foil_Gain_L2 = …
  Rule2: daughter (X,Y) ← female (X)
  T2: (Mary, Ann) +                 p2 = 2                            L2 = parent (Y,X)
      (Eve, Tom)     +              n2 = 1                            Foil_Gain_L2 = …
                                                                      Foil_Gain_L
      (Eve, Ann)     -              t2 = …
  Rule3: daughter (X,Y) ← female (X), parent (Y,X)
  T3: (Mary, Ann) +                 p3 = 2                           Final rule - …?
                                                                           rule
       (Eve, Tom)       +            n3 = 0
                                     t3 = …

 Valentina Plekhanova                 Machine Learning: ILP                               15




                                                                                               5
Complete & Consistent

 Prior satisfiablity: Before we take any hypothesis into account
       satisfiablity:
 we cannot make any conclusions with respect to the negative
 examples and the background knowledge. This is needed for the
 negative examples that have to conflict the background
 knowledge.
 Posterior satisfiability: It means a negative example cannot be
            satisfiability:
 derived from Hypothesis and Background Knowledge.




Valentina Plekhanova       Machine Learning: ILP                     16




                             Complete & Consistent


    Prior Necessity: Some positive examples may simply be a
          Necessity:
    conclusion from the background knowledge, but not all.
    Posterior Sufficiency: To verify that all positive examples
               Sufficiency:
    are covered by the background knowledge and the
    hypothesis. If the hypothesis satisfies this condition we call
    it complete.




Valentina Plekhanova       Machine Learning: ILP                     17




                                                   ID3 vs FOIL
ID3:
 Learner learns attribute descriptions.
 There are limitations, e.g. limited representational formalism.
 Limited capability of taking into account the available
background knowledge.
Foil:
 Object can be described structurally, i.e. in terms of their
                                          ,
components and relations among the components.
 Learner learns first-order relational descriptions.
 The given relations constitute the background knowledge.
                                                        .

Valentina Plekhanova       Machine Learning: ILP                     18




                                                                          6

Más contenido relacionado

La actualidad más candente

First order predicate logic (fopl)
First order predicate logic (fopl)First order predicate logic (fopl)
First order predicate logic (fopl)chauhankapil
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCSR2011
 
Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Valeria de Paiva
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologSerge Garlatti
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introductionwahab khan
 
Modular Ontologies: Package-based Description Logics Approach
Modular Ontologies: Package-based Description Logics ApproachModular Ontologies: Package-based Description Logics Approach
Modular Ontologies: Package-based Description Logics ApproachJie Bao
 
Non Standard Logics & Modal Logics
Non Standard Logics & Modal LogicsNon Standard Logics & Modal Logics
Non Standard Logics & Modal LogicsSerge Garlatti
 
Dialectica Categories and Petri Nets
Dialectica Categories and Petri NetsDialectica Categories and Petri Nets
Dialectica Categories and Petri NetsValeria de Paiva
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logicJanet Stemwedel
 
Benchmarking Linear Logic Proofs
Benchmarking Linear Logic ProofsBenchmarking Linear Logic Proofs
Benchmarking Linear Logic ProofsValeria de Paiva
 
Artificial intelligence Prolog Language
Artificial intelligence Prolog LanguageArtificial intelligence Prolog Language
Artificial intelligence Prolog LanguageREHMAT ULLAH
 
Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Sabu Francis
 
Benchmarking Linear Logic Proofs, Valeria de Paiva
Benchmarking Linear Logic Proofs, Valeria de PaivaBenchmarking Linear Logic Proofs, Valeria de Paiva
Benchmarking Linear Logic Proofs, Valeria de PaivaValeria de Paiva
 
Artificial intelligence and first order logic
Artificial intelligence and first order logicArtificial intelligence and first order logic
Artificial intelligence and first order logicparsa rafiq
 
referát.doc
referát.docreferát.doc
referát.docbutest
 
Dialectica Categories and Petri Nets
Dialectica Categories and Petri NetsDialectica Categories and Petri Nets
Dialectica Categories and Petri NetsValeria de Paiva
 

La actualidad más candente (20)

First order predicate logic (fopl)
First order predicate logic (fopl)First order predicate logic (fopl)
First order predicate logic (fopl)
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansen
 
Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)Contexts 4 quantification (CommonSense2013)
Contexts 4 quantification (CommonSense2013)
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers Prolog
 
Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
 
Inteligencia artificial
Inteligencia artificialInteligencia artificial
Inteligencia artificial
 
Modular Ontologies: Package-based Description Logics Approach
Modular Ontologies: Package-based Description Logics ApproachModular Ontologies: Package-based Description Logics Approach
Modular Ontologies: Package-based Description Logics Approach
 
Non Standard Logics & Modal Logics
Non Standard Logics & Modal LogicsNon Standard Logics & Modal Logics
Non Standard Logics & Modal Logics
 
Dialectica Categories and Petri Nets
Dialectica Categories and Petri NetsDialectica Categories and Petri Nets
Dialectica Categories and Petri Nets
 
Modal Logic
Modal LogicModal Logic
Modal Logic
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Benchmarking Linear Logic Proofs
Benchmarking Linear Logic ProofsBenchmarking Linear Logic Proofs
Benchmarking Linear Logic Proofs
 
Artificial intelligence Prolog Language
Artificial intelligence Prolog LanguageArtificial intelligence Prolog Language
Artificial intelligence Prolog Language
 
Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1Introduction to logic and prolog - Part 1
Introduction to logic and prolog - Part 1
 
Benchmarking Linear Logic Proofs, Valeria de Paiva
Benchmarking Linear Logic Proofs, Valeria de PaivaBenchmarking Linear Logic Proofs, Valeria de Paiva
Benchmarking Linear Logic Proofs, Valeria de Paiva
 
Artificial intelligence and first order logic
Artificial intelligence and first order logicArtificial intelligence and first order logic
Artificial intelligence and first order logic
 
referát.doc
referát.docreferát.doc
referát.doc
 
Dialectica Categories and Petri Nets
Dialectica Categories and Petri NetsDialectica Categories and Petri Nets
Dialectica Categories and Petri Nets
 

Destacado

Machine X Language
Machine X LanguageMachine X Language
Machine X LanguageYun-Yan Chi
 
PowerPoint
PowerPointPowerPoint
PowerPointbutest
 
Empowered Negative Specialization in Inductive Logic Programming
Empowered Negative Specialization in Inductive Logic ProgrammingEmpowered Negative Specialization in Inductive Logic Programming
Empowered Negative Specialization in Inductive Logic ProgrammingAndrea Pazienza
 
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...Josué Freelance
 
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...Jesus Rivera Licla
 
burton_discrete_logic
burton_discrete_logicburton_discrete_logic
burton_discrete_logicguest95dd54
 
Elaboracion de compost y bokashi en japon . Curso JICA 2012
Elaboracion de compost y bokashi en japon . Curso JICA 2012Elaboracion de compost y bokashi en japon . Curso JICA 2012
Elaboracion de compost y bokashi en japon . Curso JICA 2012Rolando Tencio
 
Learning Morphological Rules for Amharic Verbs Using Inductive Logic Programming
Learning Morphological Rules for Amharic Verbs Using Inductive Logic ProgrammingLearning Morphological Rules for Amharic Verbs Using Inductive Logic Programming
Learning Morphological Rules for Amharic Verbs Using Inductive Logic ProgrammingGuy De Pauw
 
Philosophy,logic and its kind,inductive and deductive reasoning ppt
Philosophy,logic and its kind,inductive and deductive reasoning pptPhilosophy,logic and its kind,inductive and deductive reasoning ppt
Philosophy,logic and its kind,inductive and deductive reasoning pptUmer Niazi
 
1.11 Inductive definitions and structural induction
1.11 Inductive definitions and structural induction1.11 Inductive definitions and structural induction
1.11 Inductive definitions and structural inductionJan Plaza
 

Destacado (12)

Machine X Language
Machine X LanguageMachine X Language
Machine X Language
 
PowerPoint
PowerPointPowerPoint
PowerPoint
 
Tesis compost
Tesis compostTesis compost
Tesis compost
 
Empowered Negative Specialization in Inductive Logic Programming
Empowered Negative Specialization in Inductive Logic ProgrammingEmpowered Negative Specialization in Inductive Logic Programming
Empowered Negative Specialization in Inductive Logic Programming
 
ilp
ilpilp
ilp
 
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...
[ISDA'11] Towards integrating fuzzy logic capabilities into an ontology based...
 
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...
Evaluacion de microorganismos eficaces en procesos de compostaje de residuos ...
 
burton_discrete_logic
burton_discrete_logicburton_discrete_logic
burton_discrete_logic
 
Elaboracion de compost y bokashi en japon . Curso JICA 2012
Elaboracion de compost y bokashi en japon . Curso JICA 2012Elaboracion de compost y bokashi en japon . Curso JICA 2012
Elaboracion de compost y bokashi en japon . Curso JICA 2012
 
Learning Morphological Rules for Amharic Verbs Using Inductive Logic Programming
Learning Morphological Rules for Amharic Verbs Using Inductive Logic ProgrammingLearning Morphological Rules for Amharic Verbs Using Inductive Logic Programming
Learning Morphological Rules for Amharic Verbs Using Inductive Logic Programming
 
Philosophy,logic and its kind,inductive and deductive reasoning ppt
Philosophy,logic and its kind,inductive and deductive reasoning pptPhilosophy,logic and its kind,inductive and deductive reasoning ppt
Philosophy,logic and its kind,inductive and deductive reasoning ppt
 
1.11 Inductive definitions and structural induction
1.11 Inductive definitions and structural induction1.11 Inductive definitions and structural induction
1.11 Inductive definitions and structural induction
 

Similar a Machine Learning: Machine Learning:

Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Ai lecture 09(unit03)
Ai lecture  09(unit03)Ai lecture  09(unit03)
Ai lecture 09(unit03)vikas dhakane
 
Algorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlgorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlex Prut
 
Lean Logic for Lean Times: Varieties of Natural Logic
Lean Logic for Lean Times: Varieties of Natural LogicLean Logic for Lean Times: Varieties of Natural Logic
Lean Logic for Lean Times: Varieties of Natural LogicValeria de Paiva
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Ashish Duggal
 
Knowledege Representation.pptx
Knowledege Representation.pptxKnowledege Representation.pptx
Knowledege Representation.pptxArslanAliArslanAli
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionPalGov
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : BasicsMitul Desai
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AIIldar Nurgaliev
 
Ontology learning from interpretations in lightweight description logics
Ontology learning from interpretations in lightweight description logicsOntology learning from interpretations in lightweight description logics
Ontology learning from interpretations in lightweight description logicsSzymon Klarman
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agentsMegha Sharma
 
AI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdfAI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdflokesh406075
 
CUMC talk notes v3
CUMC talk notes v3CUMC talk notes v3
CUMC talk notes v3Eeshan Wagh
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicPalGov
 
Unit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfUnit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfHrideshSapkota2
 
Lean Logic for Lean Times: Entailment and Contradiction Revisited
Lean Logic for Lean Times: Entailment and Contradiction RevisitedLean Logic for Lean Times: Entailment and Contradiction Revisited
Lean Logic for Lean Times: Entailment and Contradiction RevisitedValeria de Paiva
 

Similar a Machine Learning: Machine Learning: (20)

Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Ai lecture 09(unit03)
Ai lecture  09(unit03)Ai lecture  09(unit03)
Ai lecture 09(unit03)
 
Algorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography TheoryAlgorithms and Complexity: Cryptography Theory
Algorithms and Complexity: Cryptography Theory
 
Lean Logic for Lean Times: Varieties of Natural Logic
Lean Logic for Lean Times: Varieties of Natural LogicLean Logic for Lean Times: Varieties of Natural Logic
Lean Logic for Lean Times: Varieties of Natural Logic
 
Logic Seminar Spring 2011
Logic Seminar Spring 2011Logic Seminar Spring 2011
Logic Seminar Spring 2011
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
 
Knowledege Representation.pptx
Knowledege Representation.pptxKnowledege Representation.pptx
Knowledege Representation.pptx
 
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introductionJarrar.lecture notes.aai.2011s.ch8.fol.introduction
Jarrar.lecture notes.aai.2011s.ch8.fol.introduction
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : Basics
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AI
 
Ontology learning from interpretations in lightweight description logics
Ontology learning from interpretations in lightweight description logicsOntology learning from interpretations in lightweight description logics
Ontology learning from interpretations in lightweight description logics
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
AI-09 Logic in AI
AI-09 Logic in AIAI-09 Logic in AI
AI-09 Logic in AI
 
Semantics
SemanticsSemantics
Semantics
 
AI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdfAI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdf
 
CUMC talk notes v3
CUMC talk notes v3CUMC talk notes v3
CUMC talk notes v3
 
Lec 3.pdf
Lec 3.pdfLec 3.pdf
Lec 3.pdf
 
Jarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogicJarrar.lecture notes.aai.2011s.descriptionlogic
Jarrar.lecture notes.aai.2011s.descriptionlogic
 
Unit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfUnit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdf
 
Lean Logic for Lean Times: Entailment and Contradiction Revisited
Lean Logic for Lean Times: Entailment and Contradiction RevisitedLean Logic for Lean Times: Entailment and Contradiction Revisited
Lean Logic for Lean Times: Entailment and Contradiction Revisited
 

Más de butest

EL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEEL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEbutest
 
1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同butest
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALbutest
 
Timeline: The Life of Michael Jackson
Timeline: The Life of Michael JacksonTimeline: The Life of Michael Jackson
Timeline: The Life of Michael Jacksonbutest
 
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...butest
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALbutest
 
Com 380, Summer II
Com 380, Summer IICom 380, Summer II
Com 380, Summer IIbutest
 
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet JazzThe MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazzbutest
 
MICHAEL JACKSON.doc
MICHAEL JACKSON.docMICHAEL JACKSON.doc
MICHAEL JACKSON.docbutest
 
Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1butest
 
Facebook
Facebook Facebook
Facebook butest
 
Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...butest
 
Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...butest
 
NEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTNEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTbutest
 
C-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docC-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docbutest
 
MAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docMAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docbutest
 
Mac OS X Guide.doc
Mac OS X Guide.docMac OS X Guide.doc
Mac OS X Guide.docbutest
 
WEB DESIGN!
WEB DESIGN!WEB DESIGN!
WEB DESIGN!butest
 

Más de butest (20)

EL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEEL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBE
 
1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIAL
 
Timeline: The Life of Michael Jackson
Timeline: The Life of Michael JacksonTimeline: The Life of Michael Jackson
Timeline: The Life of Michael Jackson
 
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIAL
 
Com 380, Summer II
Com 380, Summer IICom 380, Summer II
Com 380, Summer II
 
PPT
PPTPPT
PPT
 
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet JazzThe MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
 
MICHAEL JACKSON.doc
MICHAEL JACKSON.docMICHAEL JACKSON.doc
MICHAEL JACKSON.doc
 
Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1
 
Facebook
Facebook Facebook
Facebook
 
Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...
 
Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...
 
NEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTNEWS ANNOUNCEMENT
NEWS ANNOUNCEMENT
 
C-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docC-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.doc
 
MAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docMAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.doc
 
Mac OS X Guide.doc
Mac OS X Guide.docMac OS X Guide.doc
Mac OS X Guide.doc
 
hier
hierhier
hier
 
WEB DESIGN!
WEB DESIGN!WEB DESIGN!
WEB DESIGN!
 

Machine Learning: Machine Learning:

  • 1. Machine Learning: Inductive Logic Programming Dr Valentina Plekhanova University of Sunderland, UK Formalisms in Inductive Learning Learning the attribute descriptions, e.g. Decision Tree descriptions, Learning the first-order relational descriptions, e.g. ILP first- Valentina Plekhanova Machine Learning: ILP 2 ILP: a Framework • Theoretical Setting: Inductive Logic Programming Setting: • Task: Concept Learning Task: • Methods: Inductive Leaning Methods: • Algorithms: FOIL Algorithms: Valentina Plekhanova Machine Learning: ILP 3 1
  • 2. Inductive Logic Programming Inductive Logic Programming ILP = I ∩ LP , where I stands for induction in machine learning, LP stands for logic programming. Valentina Plekhanova Machine Learning: ILP 4 Inductive Concept Learning: Definition Given a set E of positive and negative examples of concept C , find a hypothesis H , expressed in a given concept description language L , such that every positive example ε ∈ Ε + is covered by H − no negative examples ε ∈ Ε are covered by H ( H is "complete and consistent"). Valentina Plekhanova Machine Learning: ILP 5 Inductive Logic Programming: a Method Reminder: Induction means reasoning from specific Reminder: to general. In the case of inductive leaning from examples, the learner is given some examples from which general rules or a theory underplaying the examples are derived. Inductive inference can involve the use of background knowledge to construct a hypothesis which agrees with some set of examples according to relationship. relationship. Valentina Plekhanova Machine Learning: ILP 6 2
  • 3. Definitions Clause - component of a (complex) sentence, with its own subject and predicate. Predicate - part of a statement which says something about the subject ,e.g. "is short" in "Life is short". "is short" "Life short". Subject - (contrasted with predicate) word(s) in a sentence about which something is predicated (contrasted with object), e.g. Life. Life. Inference - process of inferring - to get conclusion or to reach an option from facts or reasoning. Valentina Plekhanova Machine Learning: ILP 7 ILP In an ILP problem the task is to define, from given examples, an unknown relation (i.e. the target predicate) in terms of (itself and) known relations from background knowledge. In ILP, the training examples, the background knowledge and examples, the induced hypotheses are all expressed in a logic program form, with additional restrictions imposed on each of the three languages. languages. For example, training examples are typically represented as ground facts of the target predicate, and most often background knowledge is restricted to be of the same form. Valentina Plekhanova Machine Learning: ILP 8 First-Order Predicate Logic First- - formal framework for describing and reasoning about objects, their parts, and relations among the objects and/or the parts. An important subset of first- order logic is Horn clauses: grandparent (X,Y) ← parent (X, Z), parent (Z,Y) where grandparent (X,Y) - head of clause or postcondition, parent (X, Z), parent (Z,Y) - body of clause or precondition, grandparent, parent - predicates; a Literal is any predicate or its negation, (X,Y), (X,Z), (Z,Y) - arguments, X, Y, Z - variables, comma between predicates means "conjunction", ← means IF (body of clause) THEN (head of clause ) Valentina Plekhanova Machine Learning: ILP 9 3
  • 4. Reasons for ILP Any sets of first-order Horn clauses can be interpreted as programs in the logic programming language PROLOG, so learning them (Horn clauses) is often called inductive logic programming (ILP). ILP is very convenient learning because there are two reasons: ILP is based on the sets of IF-THEN rules (logic) - one of the most expressive and human readable representations for learned hypotheses. ILP can be viewed as automatically inferring PROLOG programs from examples. PROLOG is a programming language in which programs are expressed as collections of Horn clauses. Valentina Plekhanova Machine Learning: ILP 10 ILP Problem: an Example • Illustration of the ILP task on a simple problem of learning family relations. • Example – an ILP Problem • The task is to define the target relation daughter (x,y) which states that person x is a daughter of person y, in terms of the background knowledge relations female and parent. parent. • These relations are given in the following table. • There are two positive ⊕ and two negative Θ examples of the target relation. Valentina Plekhanova Machine Learning: ILP 11 A Simple ILP Problem: Learning the daughter Relation Training Examples Background Knowledge Background Knowledge daughter (mary, ann) ⊕ parent (ann, mary) female(ann) daughter (eve, tom) parent (ann, tom) female(mary) ⊕ daughter (tom, ann) Θ parent (tom, eve) female(eve) daughter (eve, ann) Θ parent (tom, ian) In the hypothesis language of Horn clauses it is possible to formulate the formulate following definition of target relation: daughter (x,y) female (x), parent (y,x) Valentina Plekhanova Machine Learning: ILP 12 4
  • 5. INPUT: B, E+, E-, H=∅ R = p(X1,…,Xn) ← FOIL Algorithm WHILE E+≠ ∅ DO WHILE There are examples in E – , i.e. ∃ e ∈ E - , i.e. that are still covered by H∪ {R} DO find the best Literal L (via FOIL_Gain) to add this Literal L to R FOIL_Gain) R =R←L E - = E - {e ∈ E- | that does not satisfy R } END H = H ∪ {R} E+ = E+ {e ∈ E + | H} i.e. {The examples in E+ , that are covered by B, are removed} END OUTPUT: H Valentina Plekhanova Machine Learning: ILP 13 FOIL Algorithm Consider some rule R, and a candidate literal L that might be added to the body of R. Let R′ be the new rule created by adding literal L to R. The value Foil_Gain (L, R) of adding L to R is defined as Foil_Gain (L, R)=t { log2 [p1 / (p1+n1)]-log2 [p0 / (p0+n0)] } )]- where p0 is the number of positive bindings of rule R, n0 is the number of negative bindings of R, p1 and n1 - for rule R′. t is the number of positive bindings of rule R that are still covered after adding literal L to R. Foil_Gain value has an interpretation in terms of information theory ( -log2[p0 /(p0+n0)] is the entropy). Valentina Plekhanova Machine Learning: ILP 14 FOIL Algorithm: an Example Rule1: daughter (X,Y) ← T1: (Mary, Ann) + p1 = 2 L1 = female (X) (Eve, Tom) + n1 = 2 Foil_Gain_L1 = … Foil_Gain_L (Tom, Ann) - t1 = … L2 = parent (Y,X) (Eve, Ann) - Foil_Gain_L2 = … Rule2: daughter (X,Y) ← female (X) T2: (Mary, Ann) + p2 = 2 L2 = parent (Y,X) (Eve, Tom) + n2 = 1 Foil_Gain_L2 = … Foil_Gain_L (Eve, Ann) - t2 = … Rule3: daughter (X,Y) ← female (X), parent (Y,X) T3: (Mary, Ann) + p3 = 2 Final rule - …? rule (Eve, Tom) + n3 = 0 t3 = … Valentina Plekhanova Machine Learning: ILP 15 5
  • 6. Complete & Consistent Prior satisfiablity: Before we take any hypothesis into account satisfiablity: we cannot make any conclusions with respect to the negative examples and the background knowledge. This is needed for the negative examples that have to conflict the background knowledge. Posterior satisfiability: It means a negative example cannot be satisfiability: derived from Hypothesis and Background Knowledge. Valentina Plekhanova Machine Learning: ILP 16 Complete & Consistent Prior Necessity: Some positive examples may simply be a Necessity: conclusion from the background knowledge, but not all. Posterior Sufficiency: To verify that all positive examples Sufficiency: are covered by the background knowledge and the hypothesis. If the hypothesis satisfies this condition we call it complete. Valentina Plekhanova Machine Learning: ILP 17 ID3 vs FOIL ID3: Learner learns attribute descriptions. There are limitations, e.g. limited representational formalism. Limited capability of taking into account the available background knowledge. Foil: Object can be described structurally, i.e. in terms of their , components and relations among the components. Learner learns first-order relational descriptions. The given relations constitute the background knowledge. . Valentina Plekhanova Machine Learning: ILP 18 6