Bayesian Cognition Cours 2: Bayesian Programming

Bayesian Cognition Cours 2: Bayesian Programming

Bayesian Cognition Cours 2: Bayesian programming Julien Diard CNRS - Laboratoire de Psychologie et NeuroCognition Grenoble Pierre Bessière CNRS - Institut des Systèmes Intelligents et de Robotique Paris Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 2 Contents / schedule • Cours 1 30/09/15, C-ADM008-Amphi J. Besson – Incompleteness to uncertainty: Bayesian programming and inference • Cours 2 14/10/15, C-ADM008-Amphi J. Besson – Bayesian programming • Cours 3 21/10/15, C-ADM008-Amphi J. Besson – Bayesian robot programming (part 1) • Cours 4 04/11/15, C-ADM008-Amphi J. Besson – Bayesian robot programming (part 2) – Bayesian cognitive modeling (part 1) • Cours 5 18/11/15, C-ADM008-Amphi J. Besson – Bayesian cognitive modeling (part 2) • Cours 6 20/12/15, C-ADM008-Amphi J. Besson – Bayesian model comparison, bayesian model distinguishability • Examen ?/?/? (pour les M2) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 3 Plan • Summary & questions! • Bayesian Programming methodology – Variables – Decomposition & conditional independence hypotheses – Parametric forms (demo) – Learning – Inference • Taxonomy of Bayesian models Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 4 Probability Theory As Extended Logic • Probabilités • Probabilités « fréquentistes » « subjectives » E.T. Jaynes (1922-1998) – Une probabilité est une – Référence à un état de propriété physique d'un connaissance d'un sujet • P(« il pleut » | Jean), objet P(« il pleut » | Pierre) – Axiomatique de • Pas de référence à la limite Kolmogorov, théorie d’occurrence d’un des ensembles événement (fréquence) • Probabilités conditionnelles N – P (A)=fA = limN – P(A | π) et jamais P(A) ⇥ NΩ – Statistiques classiques – Statistiques bayésiennes • Population parente, etc. Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 5 Principle Incompleteness Preliminary Knowledge + Bayesian Learning Experimental Data = Probabilistic Representation Uncertainty P(a) P( a) 1 Bayesian Inference + ¬ = P(a∧b) = P(a)P(b | a) = P(b)P(a | b) Decision€ Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 6 Règles de calcul • Règle du produit P (AB C)=P (A C)P (B AC) | | | = P (B C)P (A BC) | | Reverend Thomas Bayes è Théorème de Bayes (~1702-1761) P (B C)P (A BC) P (B AC)= | | , si P (A C) =0 | P (A C) | • Règle de la somme | P (A C)+P (A¯ C)=1 P ([A = a] C)=1 | | | a A è Règle de marginalisation∈ P (AB C)=P (B C) | | A Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 7 Bayesian Program methodology Specification • Variables • Decomposition • Parametrical Forms or Recursive Question Description Preliminary Knowledge π Identification Program Program Experimental Data δ Inference Question Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 8 Bayesian Program = Spam detection example Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 9 Plan • Summary & questions! • Bayesian Programming methodology – Variables – Decomposition & conditional independence hypotheses – Parametric forms (demo) – Learning – Inference • Taxonomy of Bayesian models Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 10 Bayesian Program Specification • Variables • Decomposition • Parametrical Forms or Recursive Question Description Preliminary Knowledge π Identification Program Program Experimental Data δ Inference Question Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 11 Logical Proposition Logical Propositions are denoted by lowercase names: a Usual logical operators: a∧b a∨b € ¬a € Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 12 Probability of Logical Proposition To assign a probability to a given proposition a, it is necessary to have at least some preliminary knowledge, summed up by a proposition π. P(a | π) ∈ [0,1] Probabilities of the conjunctions, disjunctions and negations of propositions: € P(a ∧ b | π) P(a ∨ b | π) P(¬a | π) Probability of proposition a conditioned by both the preliminary knowledge π and some other proposition b: P(a | b ∧ π) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 13 Normalization and Product rule P(a | π) + P(¬a | π) =1 € P(a∧b | π) = P(a | π) × P(b | a∧π) = P(b | π) × P(a | b∧π) € P(a∨b | π) = P(a | π) + P(b | π) − P(a∧b | π) € Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 14 Discrete Variable • Variables are denoted by names starting with one uppercase letter: X • Definition: a discrete variable X is a set of propositions xi – Mutually exclusive: i ≠ j ⇒ x ∧ x = false € [ i j ] – Exhaustive: at least one€ is true • The cardinal€ of X is denoted: "X# € • Continuous variable: limit case when "! X$#→ ∞ Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 15 € Variable combination • Variable conjunction X ∧Y = {xi ∧ y j } • Variable disjunction € X ∨Y = {xi ∨ y j } Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 16 € Bayesian Program Specification • Variables • Decomposition • Parametrical Forms or Recursive Question Description Preliminary Knowledge π Identification Program Program Experimental Data δ Inference Question Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 17 Description The purpose of a description is to specify an effective method to compute a joint distribution on a set of variables: {X1, X 2 ,..., X n} given some preliminary knowledge π and a set of experimental data δ. € This joint distribution is denoted as: P(X1 ∧ X 2 ∧...∧ X n |δ ∧π) € Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 18 Decomposition Partition in K subsets: Li ≠ ∅ Li = Xi1 ∧ Xi2 ∧... Conjunction rule: 1 2 n € P(X ∧ X ∧...∧ X |δ ∧π) = P(L1 |δ ∧π) × P(L2 | L1 ∧δ ∧π) ×...× P(Lk | Lk−1 ∧...∧L1 ∧δ ∧π) Conditional independence hypotheses: Ri ⊂ Li P Li | Li−1 ∧...∧L1 ∧δ ∧π € ( ) = P(Li | Ri ∧δ ∧π) Decomposition: P(X1 ∧ X 2 ∧...∧ X n |δ ∧π) € = P L1 |δ ∧π × P L2 | R2 ∧δ ∧π ×...× P Lk | Rk ∧δ ∧π ( ) ( ) ( ) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 19 € Indépendance et indépendance conditionnelle • Indépendance – P(X Y) = P(X) P(Y) – P(X | Y) = P(X) • Indépendance conditionnelle – P(X Y | Z) = P(X | Z) P(Y | Z) – P(X | Y Z) = P(X | Z) – P(Y | X Z) = P(Y | Z) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 20 Independence vs Conditional Independence Indépendance mais pas indépendance conditionnelle : I0 indépendant de F0 : P(F0 | I0) = P(F0) I0 pas indépendant de F0, conditionnellement à S0 : P(F0 | I0 S0) ≠ P(F0 | S0) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 21 Independence vs Conditional Independence Indépendance conditionnelle mais pas indépendance : S2 indépendant de C0, conditionnellement à O0 : P(S2 | C0 O0) = P(S2 | O0) S2 pas indépendant de C0 : P(S2 | C0) ≠ P(S2) Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 22 The importance of Conditional Independence • Nombre de probabilités (≠ nb param) – Avant hypothèses d’indépendance conditionnelle P (I I I F ... O O ) 19 63 18 0 ∧ 1 ∧ 3 ∧ 0 ∧ ∧ 2 ∧ 3 11 ≅ 2 ≅ 9.2 x 10 – Après hypothèses P (I I I F ... O O ) 0 ∧ 1 ∧ 3 ∧ 0 ∧ ∧ 2 ∧ 3 = P (I0)P (I1)P (I3) (11x11) + (113x4) + (115x4) 218 P (F0)P (F1)P (F2)P (F3) ≅ 218 = 262 144 P (C0)P (C1)P (C2)P (C3) P (S I F )P (S I F )P (S O F )P (S I F ) 0 | 0 ∧ 0 1 | 0 ∧ 1 2 | 0 ∧ 2 3 | 3 ∧ 3 P (O I I S C )P (O I I S C ) 0 | 0 ∧ 1 ∧ 0 ∧ 0 1 | 0 ∧ 1 ∧ 1 ∧ 1 P (O O O S C )P (O I O S C ) 2 | 0 ∧ 1 ∧ 2 ∧ 2 3 | 3 ∧ 2 ∧ 3 ∧ 3 Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 23 Bayesian Program Specification • Variables • Decomposition • Parametrical Forms or Recursive Question Description Preliminary Knowledge π Identification Program Program Experimental Data δ Inference Question Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 24 Parametrical Forms or Recursive Questions Parametrical form: P Li | Ri ∧δ ∧π = f Li ( ) µ(Ri,δ)( ) Recursive Question: € P(Li | Ri ∧δ ∧π) = P(Li | Ri ∧δ % ∧π %) - modular and hierarchical programs - (or coherence variables) € Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 25 « Vocabulaire probabiliste » • Démo Mathematica Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 26 Bayesian Program Specification • Variables • Decomposition • Parametrical Forms or Recursive Question Description Preliminary Knowledge π Identification Program Program Experimental Data δ Inference Question Julien Diard — LPNC-CNRS Cours EDISCE/EDMSTII - M2R Sciences Cognitives, « Cognition bayésienne » — 2015 27 Translating knowledge

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    69 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us