仓库源文站点原文


layout: post title: "AI 笔记 Week 07 Bayes Nets" date: "2017-10-12 02:24:19" categories: 计算机科学 excerpt: "Week 07 This week you should watch Lesson 6, Bayes Nets, and read Chapte..."

auth: conge

Week 07

This week you should watch Lesson 6, Bayes Nets, and read Chapter 14 in AIMA (Russell & Norvig).  > Assignment 3:  Bayes Nets Sampling Due: October 10 at 11:59PM UTC-12 (Anywhere on Earth time)

Challenge Question

Graduation and job offer

Answer

a simple Bayes net

bayes net quiz

Computing Bayes Rule

normalizing pseudo probablility

Two Test Cancer example

conditional independence

Quiz on Conditional independece

the relationship between absolute and conditional independence

quiz

Independence

quiz: calculate P(R|H)

Conditional Dependence

Conditional Dependence

independence does not imply conditional independence

general definition of Bayes Network

Bayes Network requires fewer parameters to represent the probability distributions

quiz: Number of parameters needed

quiz: Number of parameters needed 2

quiz: Value Of A Network 3

D Separation

quiz:D Separation1

Quiz: D Separation2

D Separation Rules

Quiz: D Separation 3


Now the application of Bayes Network:

Probabilistic Inference

In the remaining part of this lesson, you will learn about probabilistic inference using Bayes Nets, i.e. how to answer questions that you are interested in, given certain inputs.

Evidence, query and hidden nodes

quiz: what is evidence, hidden and query when trying to solve P(B|M)?

Enumeration

Enumerate f(+e, +a)

The calculation becomes reading from the Bayes net table and summarize them. But when the number of nodes becomes larger, this method requires a lot of calculation.

Technique 1: pulling out terms that won't change with the loop variable

Technique 2: maximize independence

Bayes net in Causal direction

Causal direction

Value elimination

Value elimination is a two-step operation: eliminate some fac Joining factors and elimination

example of joining factors

Example of elimination

Value elimination 2

Value elimination 3

Approximate Inference

approximate by sampling

Quiz: sampling, give R and S, what's the rows to consider to sample from, and where W should be positive?

Rejection Sampling

Likelyhood weighting

Likelihood Weighting

quiz: Likelihood Weighting

Likelihood weighting fails helping P(C|+s, +r

Gibbs Sampling

image.png

Monty Hall Problem

remember, the host will never reveal the door that the player selected in the second step, so be revealing one door, we did not know more about the door selected, but the door not selected got updated by the information provided by the revealing door