Notes - MIECT
Inteligência Artificial
Notes - MIECT
Inteligência Artificial
  • Inteligência Artificial
  • Tópicos de Inteligência Artificial
    • Definição de “Inteligência”
    • História até à “Inteligência Artificial”
  • Agentes
    • Definição de “Agente”
    • Teste de Turing
    • A "Sala Chinesa" de Searle
    • Agentes Reactivos
    • Agentes Deliberativos
    • Arquiteturas
  • Representação do Conhecimento
    • Redes Semântica
      • GOLOG
      • UML / Diagramas de Classes
      • Indução versus Dedução
      • Em Python
    • Resolução e Refutação na Lógica de Primeira Ordem
    • Lógica Proposicional e Lógica de Primeira Ordem
      • Interpretações em Lógica Proposicional
      • Interpretações em Lógica de Primeira Ordem
      • Lógica - Regras de Substituição
      • CNF e Forma Clausal
      • Consequências Lógicas, Provas
      • Correcção, Completude
      • Metateoremas
      • Resolução não é Completa
      • Refutação por Resolução
      • Substituições, Unificação
      • Resolução com Claúsulas de Horn
    • Linguagem KIF
    • Engenharia do Conhecimento
    • Ontologias
    • Redes de Bayes
  • Técnicas de Resolução de Problemas
    • Resolução de problemas em IA
    • Formulação de problemas e pesquisa de soluções
    • Estratégias de pesquisa
      • Avaliação das estratégias de pesquisa
      • Pesquisa A*
        • Avaliação da Pesquisa em Árvore
      • IDA*
      • RBFS
      • SMA*
      • Pesquisa com propagação de restrições
      • Pesquisa por melhorias sucessivas
      • Planeamento
        • Aprendizagem
      • Árvores de decisão
      • Avaliação de algoritmos de aprendizagem supervisionada
  • Bayesian Networks
    • Ways to deal with Uncertainty
    • Discrete Random Variables
    • Probabilities
    • Conditional Probability
    • More General Forms of Bayes Rule
    • The Joint Distribution
    • Independence
    • Computing a Joint Entry
    • Exercises
Powered by GitBook
On this page
  • Exercise 1
  • Resolution
  1. Bayesian Networks

Exercises

PreviousComputing a Joint Entry

Last updated 2 years ago

Exercise 1

For example, suppose that we are interested in diagnosing cancer in patients who visit a chest clinic.

  • Let A represent the event "Person has cancer".

  • Let B represent the event "Person is a smoker".

Suppose we know the probability of the prior event A is 0.1 on the basis of past data (10% of patients entering the clinic turn out to have cancer). Thus:

  • P(A)=0.1

We want to compute the probability of the posterior event P(A|B).

It is difficult to find this out directly. However, we are likely to know P(B) by considering the percentage of patients who smoke suppose P(B)=0.5. We are also likely to know P(B|A) by checking from our records the proportion of smokers among those diagnosed with cancer. Suppose P(B|A)=0.8.

Use Bayes' rule to compute P(A|B).

Resolution

Doing it using Erlang:

  1. First we represent the basic probability facts as Erlang functions: - p({patient, cancer}) -> 0.1; - p({patient, smoker}) -> 0.5.

  2. We then represent the conditional probabilities. - cp({patient, smoker}, {patient, cancer}) -> 0.8; - cp(_, _) -> none.

  3. Next we write query rules that can be used to find various probabilities. There are three rules, covering the case where the probability is known, the conditional probability is known, or we can compute the conditional probability using Bayes theorem.

We now have a simple system for representing and querying knowledge expressed as probabilities.

  • 1> bayes:getp({{patient, cancer}, {patient, smoker}});