人工智能 artificial intelligence

82
Artificial Intelligence Uncertainty Reasoning: 1 © Graduate University , Chinese academy of Sciences. 人人人人 Artificial Intelligence

Upload: nasim-farley

Post on 02-Jan-2016

38 views

Category:

Documents


6 download

DESCRIPTION

人工智能 Artificial Intelligence. 不确定性推理 Uncertainty Reasoning. 本章主要内容. 基本概念 主观 Bayes 方法 确定性方法 证据理论 模糊推理. 基本概念(1/3). 什么是不确定性推理? 不确定性推理是建立在非经典逻辑上的一种推理,是对不确定性知识的运用与处理 是从不确定性的初始证据出发,通过运用不确定性的知识,最终推出具有一定程度的不确定性但却合理或者近乎合理的结论的思维过程 为什么要研究不确定性推理? 日常生活中含有大量的不确定的信息 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 1

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

人工智能Artificial Intelligence

Page 2: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 2

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

不确定性推理Uncertainty Reasoning

Page 3: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 3

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

本章主要内容

•基本概念• 主观 Bayes 方法• 确定性方法• 证据理论• 模糊推理

Page 4: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 4

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

基本概念 (1/3)• 什么是不确定性推理 ?

– 不确定性推理是建立在非经典逻辑上的一种推理 , 是对不确定性知识的运用与处理

– 是从不确定性的初始证据出发 , 通过运用不确定性的知识, 最终推出具有一定程度的不确定性但却合理或者近乎合理的结论的思维过程

• 为什么要研究不确定性推理 ?– 日常生活中含有大量的不确定的信息– ES 系统中大量的领域知识和专家经验,不可避免的包含

各种不确定性。

Page 5: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 5

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

基本概念 (2/3)

• 不确定性推理的基本问题 :

– 表示问题 : 即采用什么方法描述不确定性 . 一般有数值表示和非数值的语义表示方法 .

– 计算问题 : 主要指不确定性的传播和更新 , 也即获得新信息的过程 . 主要包括 :

• 已知 C(A), AB f(B,A), 如何计算 C(B)• 已知 C1(A), 又得到 C2(A), 如何确定 C(A)

• 如何由 C(A1),C(A2) 计算 C(A1A2), C(A1A2) – 语义问题 : 指的是上述表示和计算的含义是什么

, 如何进行解释 .

Page 6: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 6

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

基本概念 (3/3)

不确定推理方法的分类• 形式化方法 : 在推理一级扩展确定性方法 .

– 逻辑方法 : 是非数值方法 , 采用多值逻辑、非单调逻辑来处理不确定性

– 新计算方法 : 认为概率方法不足以描述不确定性 , 出现了确定性理论 ,确定性因子 , 模糊逻辑方法等

– 新概率方法 : 在传统的概率框架内 , 采用新的计算工具以确定不确定性描述

• 非形式化方法 : 在控制一级上处理不确定性– 如制导回溯、启发式搜索等等

Page 7: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 7

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

本章主要内容

• 基本概念

•主观 Bayes 方法• 可信度方法• 证据理论• 模糊推理

Page 8: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 8

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

主观 Bayes方法

• 1976 年提出的,应用于地矿勘探专家系统 Prospector 中• 不确定推理系统包括:

– 不确定性的表示:• 规则 / 知识• 事实 / 证据

– 不确定性的计算• 组合证据的不确定算法• 不确定性的传递算法• 结论的不确定算法

Page 9: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 9

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

规则不确定的表示( 1/2 ) if E then (LS , LN) H (P(H))

(1)E 是规则的前提条件, H 是结论, P(H) 是 H 的先验概率,是指在没有任何证据的情况下结论 H 为真的概率。

(2)LS 是充分性度量:表示 E 对 H 的支持程度,取值范围 [0,+), 其定义为:

P(E/H) LS=------------------ P(E/~H)

Page 10: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 10

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

规则不确定的表示( 2/2 )(3)LN 是必要性度量:表示 ~E 对 H 的支持程度,取值范围 [0,

+), 其定义为:

P(~E/H) 1-P(E/H) LN=----------------=------------------- P(~E/~H) 1-P(E/~H)

Page 11: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 11

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据不确定的表示

对于初始证据 E ,由用户根据观察 S 给出 P(E/S).

引入可信度函数 C(E/S):

(1)C(E/S)=-5, 表示在 S 下, E 肯定不存在 P(E/S)=0

(2)C(E/S)=0, 表示在 S 与 E 无关, P(E/S)=P(E)

(3)C(E/S)=5, 表示在 S 下, E 肯定存在, P(E/S)=1

(4)C(E/S) 为其他值的时候, P(E/S) 可以通过线性插值得到。

Page 12: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 12

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

组合证据不确定的表示

(1)E=E1 E2 … En

如果已知 P(E1/S),…, P(En/S), 则:

P(En/S)=min{P(E1/S),…, P(En/S)}

(2)E=E1 E2 … En

如果已知 P(E1/S),…, P(En/S), 则:

P(En/S)=max{P(E1/S),…, P(En/S)}

(3) 对于“非”: P(~E/S)=1 - P(E/S)

Page 13: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 13

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

不确定性的传递算法

主观 Bayes 方法推理的任务就是根据证据 E 的概率 P(E) 和LS , LN 的值,把 H 的先验概率 P(H) 更新为 P(H/E) 或P(H/~E) 。

分下面三种情况讨论:• 证据肯定存在• 证据肯定不存在• 证据不确定

Page 14: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 14

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据肯定存在( 1/2 )

• 证据肯定存在时: P(E)=P(E/S)=1

• P(H/E)=P(H) P(E/H)/P(E)

P(~H/E)=P(~H) P(E/~H)/P(E)

P(H/E) P(H) P(E/H) ------------ = ---------- ----------- P(~H/E) P(~H) P(E/~H)

• 引入几率函数 O(x) 定义为: O(x)=P(x)/(1-P(x)), P(x)=O(x)/(1+O(x))

Page 15: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 15

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据肯定存在( 2/2 )

• O(H/E)=LS O(H)

P(H/E)=LS P(H)/((LS-1) P(H) +1)

• LS 的意义:

(1)LS>1 时 , O(H/E) > O(H), P(H/E)>P(H) ,说明 E 的存在将增强 H 为真的概率。 E 的存在对 H 为真是充分的,所以称 LS 为充分性度量

(2) LS=1 时 , O(H/E)=O(H)

(3) LS<1 时 , O(H/E) < O(H),E 导致 H 为真的可能性下降

(4) LS=0 时 , O(H/E)=0,E 的存在将使 H 为假

Page 16: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 16

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据肯定不存在( 1/2 )

• 证据肯定不存在时: P(E)=P(E/S)=0 , P(~E)=1

• P(H/~E)=P(H) P(~E/H)/P(~E)

P(~H/~E)=P(~H) P(~E/~H)/P(~E)

P(H/~E) P(H) P(~E/H) ------------ = ---------- ---------------- P(~H/~E) P(~H) P(~E/~H)

• O(H/~E)=LN O(H)

P(H/~E)=LN P(H)/((LN-1) P(H) +1)

Page 17: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 17

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据肯定不存在( 2/2 )

• LN 的意义:

(1)LN>1 时 , O(H/~E) > O(H), P(H/~E)>P(H) ,说明 E 的不存在将增强 H 为真的概率。

(2) LN=1 时 , O(H/~E)=O(H)

(3) LN<1 时 , O(H/~E) < O(H),E 的不存在导致 H 为真的可能性下降,即 E 的不存在将反对 H 为真,说明 E 对 H 为真的必要性

(4) LN=0 时 , O(H/~E)=0,E 的不存在将使 H 为假。这里也可以看出 E 对 H 为真的必要性,所以也称 LN 为必要性度量

Page 18: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 18

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

不确定性的传递算法

• 从上面讨论知:(1) 若 E 越是支持 H 为真时,则应使 LS 越大(2) 若 E 对 H 越是必要时,则应使 LN 越小• LS 、 LN 的取值情况: LS 0, LN 0

只能出现: 但不能出现: LS<1 ,LN>1 LS>1, LN>1

LS>1, LN<1 LS<1, LN<1

LS=LN=1

Page 19: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 19

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

例一

• 设有如下知识:

r1: if E1 then (10,1) H1 (0.03)

r2: if E2 then (20,1) H2 (0.05)

r3: if E3 then (1,0.002) H3 (0.3)

求:当证据存在及不存在时, P(Hi/Ei) 及 P(Hi/~Ei) 的值各是多少

Page 20: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 20

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据不确定( 1/2 )• 证据不定时: 0<P(E/S)<1, 后验概率为: P(H/S)=P(H/E) P(E/S)+P(H/~E) P(~E/S)

• 分四种情况讨论如下:

(1)P(E/S)=1 则有 P(~E/S)=0, 证据肯定存在

(2)P(E/S)=0 则有 P(~E/S)=1, 证据肯定不存在

(3)P(E/S)=P(E), 说明 E 和 S 无关

P(H/S)=P(H)

Page 21: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 21

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据不确定( 2/2 )

(4) 当 P(E/S) 为其他值的时候,通过分段插值计算 P(H/S) 的值。

0 P(E/S)1P(E)

P(H/~E)

P(H)

P(H/E)

P(H/S)

Page 22: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 22

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

例二

• 当证据 E 必然发生, H1 的先验概率 0.03, H2 的先验概率 0.01, 且有规则 :

r1: if E then (20,1) H1

r2: if H1 then (300, 0.0001) H2

求: P(H2|E)

Page 23: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 23

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

结论不确定性的合成

若有 n 条知识都支持相同的结论,而且每条知识的前提所对应的证据 Ei(i=1,…,n) 都有相应的观察 Si 与之对应,此时只要先对每条知识分别求出 O(H/ Si) 然后就可用下式求出结论不确定性的合成:

O(H/ S1, …,Sn)=

O(H/ S1) O(H/Sn) ----------- … --------------- O(H) O(H) O(H)

Page 24: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 24

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

例三

当证据 E1 、 E2 、 E3 、 E4 必然发生后, H

的先验概率为 0.03, 且有规则则 :

r1: if E1 then (20,1) H

r2: if E2 then (300,1) H

求:结论 H 的概率变化化 .

Page 25: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 25

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

本章主要内容

• 基本概念• 主观 Bayes 方法

•可信度方法• 证据理论• 模糊推理

Page 26: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 26

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

可信度方法模型

• 主要包括:– 知识的不确定性表示– 证据的不确定性表示– 组合证据的不确定性表示– 不确定性的传递算法– 结论不确定性的合成算法

Page 27: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 27

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

知识的不确定性表示

• 产生式规则: If E Then H (CF(H, E))

– CF(H,E) 是该条知识的可信度,称为可信度因子或规则强度,表示当前提条件 E 所对应的证据为真时,它对结论 H 为真的支持程度。

– CF 是根据经验对一个事物或现象为真的可信程度的度量– CF(H,E) 取值为: [-1,1] ,

Page 28: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 28

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

知识的不确定性表示 ( 续 )

• CF 定义:

CF(H,E)=MB(H,E)-MD(H,E)

• MB: 信任增长度,它表示因与前提条件 E 匹配的证据的出现,使结论 H 为真的信任增长度

• MD :不信任增长度,它表示因与前提条件 E 匹配的证据的出现,对结论 H 的不信任增长度

Page 29: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 29

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

知识的不确定性表示 ( 续 )

• MB 的定义:由条件概率和先验概率定义 1 若 P ( H ) =1

MB(H,E)= max{P(H|E), P(H)} – P(H) ----------------------------------- 否则 1-P(H)

• MD 的定义: 1 若 P ( H ) =0MD(H,E)= min {P(H|E), P(H)} – P(H) ----------------------------------- 否则 -P(H)

Page 30: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 30

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

知识的不确定性表示 ( 续 )

• MB(H,E) 和 MD(H,E) 是互斥的:即一个证据不能既增加对 H 的信任度,又不能同时增加对 H 的不信任度

当 MB(H,E) > 0 , MD(H,E)=0

当 MD(H,E) > 0, MB(H,E)=0

( | ) ( ), ) 0 ( | ) ( )

1 ( )

P H E P HMB H E H E P H

P H

( 若 P

( | ) ( )0 , ) ( | ) ( )

( )

P H E P HMD H E H E P H

P H

( 若 P

( , ) 0 ( | ) ( )F H E H E P H C 若 P

Page 31: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 31

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

知识的不确定性表示 ( 续 )

• CF(H,E) 的直观意义:(1)CF(H,E)>0, 则 P(H|E)>P(H):E 的出现增加了 H 为真的概率,增加

了 H 为真的可信度(2)CF(H,E)<0, 则 P(H|E)<P(H):E 的出现减少了 H 为真的概率,增加

了 H 为假的可信度(3)CF(H,E)=0, 则 P(H|E)=P(H): 表示 H 与 E独立,即 E 的出现对 H

没有影响• CF(H,E) 几个特殊的值:

(1) 前提真,则结论必真,即 P(H|E)=1, 有 CF(H,E)=1

(2) 前提真,而结论必假,即 P(H|E)=0, 有 CF(H,E)=-1

(3) 前提与结论无关,即 P(H|E)=P(H), 有 CF(H,B)=0

Page 32: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 32

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据的不确定性表示

• 证据的不确定性也用 CF 来表示• CF 值的来源分两种情况:

– 初始证据:由提供证据的用户给出– 以前的结论作为新证据:由传递算法推出

• 证据的 CF 取值范围: [-1 , 1]

– E 肯定为真时: CF(E)=1– E 肯定为假时: CF(E)= - 1– 对 E 一无所知时: CF(E)=0– CF(E)>0 表示 E 以 CF(E) 为真– CF(E)<0 表示 E 以 CF(E) 为假

Page 33: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 33

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

组合证据不确定性算法

(1)E=E1 E2 … En

如果已知 CF(E1),…, CF(En), 则:

CF(E)=min{CF(E1),…, CF(En)}

(2)E=E1 E2 … En

如果已知 CF(E1),…, CF(En), 则:

CF(E)=max{CF(E1),…, CF(En)}

Page 34: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 34

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

不确定性的传递算法• 已知: CF(E)

E H CF(H,E)

则规定: CF(H)=CF(H,E) max{0, CF(E)}

• 规定: CF(~E)= -CF(E)

• 当证据为假时: CF(H)=0 ,即该模型没有考虑证据为假时对H 所产生的影响

• 当证据为真时, CF(H,E) 实际上就是结论 H 的可信度 CF(H)

Page 35: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 35

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

结论不确定性合成算法

• r1: if E1 then H (CF(H,E1))

r2: if E2 then H (CF(H,E2)) 求合成的 CF(H)

(1)首先对每条知识求出 CF(H) ,即:

CF1(H)=CF(H,E1) max{0, CF(E1)}

CF2(H)=CF(H,E2) max{0, CF(E2)}

(2) 规定:

CF1(H)+CF2(H)-CF1(H) CF2(H)

CF1(H)>=0, CF2(H)>=0

CF(H)= CF1(H)+CF2(H)+CF1(H) CF2(H)

CF1(H)<0, CF2(H)<0

CF1(H) +CF2(H) 其他

Page 36: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 36

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

可信度模型 ---- 例一

r1: A1 B1 CF(B1, A1)=0.8

r2: A2 B1 CF(B1, A2)=0.5

r3: B1 A3 B2 CF(B2, B1 A3)=0.8

初始证据 A1 , A2 , A3 的 CF 值均设为 1 ,而初始未知证据 B1 , B2 的 CF 值为 0 ,即对 B1 , B2 是一无所知的。

求: CF(B1 ) ,CF(B2) 的更新值

Page 37: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 37

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

可信度模型 ---- 例二

r1: A1 B1 CF(B1, A1)=0.8

r2: A2 B1 CF(B1, A2)=0.6

初始证据 A1 , A2 的 CF 值均设为 0.5 ,而初始未知证据 B1 的 CF 值为0.1 。

求: CF(B1 ) 的更新值

Page 38: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 38

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

本章主要内容

• 基本概念• 主观 Bayes 方法• 确定性方法

•证据理论• 模糊推理

Page 39: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 39

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据理论

• 主要内容:– 概率分配函数– 信任函数– 似然函数– 证据的不确定性度量– 规则的不确定性度量– 推理计算

Page 40: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 40

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

概率分配函数

• 定义: U 为样本空间,设函数 M : 2U[0, 1] ,且满足: M() =0

AUM(A)=1

则称 M 为 2U 上的概率分配函数, M(A) 称为 A 的基本概率数

(1)M(A) 的作用是把 U 的任意一个子集 A 都映射为 [0,1] 上的一个数M(A) 。它表示证据对 U 的子集 A 成立的一种信任度量,是对 U 的子集的信任分配。

(2) 概率分配函数不是概率。

Page 41: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 41

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据理论

• 例: U={红,黄,蓝 }

假设:

M({红 })=0.3, M({黄 })=0, M({蓝 })=0.1,

M({红 ,黄 })=0.2, M({红 ,蓝 })=0.2,

M({黄 ,蓝 })=0.1,

M({红 ,黄 ,蓝 })=0.1, M({})=0

Page 42: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 42

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

信任函数

定义:命题的信任函数 Bel: 2U[0, 1] ,且

Bel(A) = BAM(B) 对所有的 AU

(1)命题 A 的信任函数的值,是 A 的所有子集的基本概率分配函数值的和,用来表示对 A 的总的信任

(2) Bel 函数又称为下限函数

(3) Bel() = M() =0

Bel(U) = BUM(B) = 1

Page 43: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 43

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

似然函数

定义:似然函数 Pl: 2U[0, 1] ,且

Pl(A) =1- Bel(~A) 对所有的 AU

(1) Bel(A) 表示对 A 为真的信任度,则 Bel(~A) 表示对 ~A 为真,即 A 为假的信任度,所以 Pl(A) 表示 A 非假的信任度,它又称为上限函数。

(2) Pl(A) =1- Bel(~A) = ABM(B)

(3) 0 Bel(A) Pl(A) 1

(4) Pl(A) - Bel(A): 表示既不信任 A ,也不信任 ~A 的一种度量,可表示对不知道的度量

Page 44: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 44

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据的不确定性度量

(1) 以区间 (Bel(A), Pl(A))作为证据 A 的不确定性度量:表示了对 A 信任程度的上限和下限。– A(0,0): 表示 A 为假– A(0,1): 表示对 A 一无所知– A(1,1): 表示 A 为真

(2) 以函数:

f1(A)=Bel(A)+(|A| |U|) (Pl(A)-Bel(A))

表示证据 A 的不确定性度量。

f1()=0 , f1(U)=1

0 f1(A) 1 AU

Page 45: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 45

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

规则的不确定性度量

设 U={u1,…, un},A 和 B 为 U 的子集,如:

A={a1,…, am}, B={b1,…, bk}

规则表示如下:

A B={b1,…, bk} {c1,…, ck}

(1)B 是结论,用样本空间的子集表示, b1,…, bk 是该子集中的元素

(2) c1,…, ck 表示规则的不确定性度量 , ci 表示 bi 的可信度

(3) ci0 , ni=1ci1

Page 46: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 46

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

推理计算

• f1(A1A2) = min{f1(A1), f1(A2)}

f1(A1A2) = max{f1(A1), f1(A2)}

• 已知 f1(A)

A B ={b1,…, bk} {c1,…, ck} , 求 f1(B)

(1) 求出 B 的概率分配函数 M(B)=M({b1},…, {bk})={f1(A) c1,…, f1(A) ck}

M(U)=1 - ki=1 f1(A) ci

Page 47: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 47

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

推理计算 ( 续 )

如果有两条知识支持同一条结论:

A1 B ={b1,…, bk} {c1,…, ck} ,

A2 B ={b1,…, bk} {c1,…, ck} ,

则首先分别对每一条知识求出概率分配函数:

M1({b1},…, {bk})

M2({b1},…, {bk})

然后由: M=M1M2

求出结论 B 的概率分配函数 M

Page 48: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 48

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

推理计算 ( 续 )

概率分配函数的合成定义:

设 M1 和 M2 是两个概率分配函数,则合成 M=M1M2 定义为:

M() =0

M(A) =K XY=A M1(X) M2(Y)

其中 x,y 是 U 的子集,并且:

K-1=1- XY= M1(X) M2(Y)

= XY M1(X) M2(Y)

Page 49: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 49

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

推理计算 ( 续 )

概率分配函数的合成示例:例一:设 U={黑,白 } ,且

M1({黑 },{白 },{黑 ,白 },)=(0.3, 0.5, 0.2, 0)

M2({黑 },{白 },{黑 ,白 },)=(0.6, 0.3, 0.1, 0)

例二:设 U={a,b,c,d}

M1({b,c,d},U)=(0.7, 0.3)

M2({a,b},U)=(0.6, 0.4)

Page 50: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 50

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

推理计算 ( 续 )

(2) 求出 Bel(B) ,Pl(B),f1(B)

Bel(B) = ABM(A)

Pl(B) =1- Bel(~B)

f1(B)=Bel(B)+(|B| |U|) (Pl(B)-Bel(B))

Page 51: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 51

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

证据理论示例

例一:已知 f1(A1)=0.8, f1(A2)=0.6, |U|=20

A1A2B={b1,b2} (c1,c2)=(0.3,0.5)

求: f1(B)

例二:

已知 f1(A1)=0.53, f1(A2)=0.52, |U|=20

A1B={b1,b2 ,b3} (c1,c2 ,c3)=(0.1,0.5,0,3)

A2B={b1,b2 ,b3} (c1,c2 ,c3)=(0.4,0.2,0,1)

求: f1(B)

Page 52: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 52

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

本章主要内容

• 基本概念• 主观 Bayes 方法• 确定性方法• 证据理论

•模糊推理

Page 53: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 53

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理• 处理随机性的理论基础是概率论

处理模糊性的基础是模糊集合论 • 本节主要内容:

– 模糊集合与操作– 语言变量– 模糊推理

Page 54: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 54

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 1)• 经典集合是清晰的,即:

一个元素 x是否属于某一个集合 A 是明确的,要么 x属于 A ,要么 x不属于 A ,两者必居其一,而且只能居其一。

C(x) 为特征函数

Ax

AxxC

0

1)(

Page 55: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 55

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 2)• 例子 :

Rule:If the temperature is higher than 80F, it is hot; otherwise, it is not hot.

Cases:– Temperature = 100F Hot– Temperature = 80.1F Hot– Temperature = 79.9F Not hot– Temperature = 50F Not hot

情绪逻辑的不足 The membership function of crisp logic fails to

distinguish between members of the same set.

Page 56: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 56

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 3)Conception of Fuzzy Logic

• Many decision-making and problem-solving tasks are too complex to be defined precisely

• however, people succeed by using imprecise knowledge

• Fuzzy logic resembles human reasoning in its use of approximate information and uncertainty to generate decisions.

Page 57: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 57

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 4)Natural Language • Consider:

– Joe is tall -- what is tall?– Joe is very tall -- what does this differ from tall?

• Natural language (like most other activities in life and indeed the universe) is not easily translated into the absolute terms of 0 and 1.

“false” “true”

Page 58: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 58

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 5)• Fuzzy logic is a superset of boolean logic

• It was created by Dr. Lotfi Zadeh in 1960s for the purpose of modeling the uncertainty inherent in natural language

• In fuzzy logic, it is possible to have partial truth values. And is an approach to uncertainty that combines real values [0…1] and logic operations

Fuzzy logic is based on the ideas of fuzzy set theory and fuzzy set membership often found in natural (e.g., spoken) language.

Page 59: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 59

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 6)• 模糊集合:把传统集合论中由特征函数决定的绝对隶属关系模糊化,把集合( 0 , 1)扩散到区间 [0, 1] ,以表示元素 x隶属于子集 A 的模糊程度。

Page 60: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 60

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 7)• Fuzzy Set deals with degrees of membership and

degrees of truth, it is a set with fuzzy boundaries.

• In classical set theory;

fA(x):X {0,1}, where fA(x) =

• In fuzzy sets;

A(x):X {0,1},

where A(x) = 1, if x is totally in A;

A(x) = 0, if x is not in A;

0 < A(x) < 1, if x is partly in A

1, if xA

0, if xA

Page 61: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 61

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 8)

• Classical tall men example.

Page 62: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 62

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 9)

• Crisp and fuzzy sets of tall men

Page 63: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 63

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 10)• Example: “Young”

• Example:

– Ann is 28, 0.8 in set “Young”– Bob is 35, 0.1 in set “Young”– Charlie is 23, 1.0 in set “Young”

• Unlike statistics and probabilities, the degree is not describing probabilities that the item is in the set, but instead describes to what extent the item is the set.

Page 64: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 64

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 11)• Membership function of fuzzy logic

Age25 40 55

Young Old1

Middle

0.5

DOM

Degree of Membership

Fuzzy values

Fuzzy values have associated degrees of membership in the set.

0

Page 65: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 65

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 12)• 模糊集的逻辑运算

• E.g.

– A = {1.0, 0.20, 0.75}– B = {0.2, 0.45, 0.50}– A B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)}

= {1.0, 0.45, 0.75}

)](),(max[)( xxx BABA

Page 66: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 66

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 13)• 模糊集的逻辑运算

• E.g.

– A B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75, 0.50)} = {0.2,

0.20, 0.50}

)](),(min[)( xxxBA BA

Page 67: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 67

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊集合与操作( 14)• 模糊集的逻辑运算

• Example.

– Ac = {1 – 1.0, 1 – 0.2, 1 – 0.75} = {0.0, 0.8, 0.25}

)(1)( xx AA

Page 68: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 68

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

语言变量 (1)

• 模糊集合的一种应用是计算语言学,目的是对自然语言的语句进行计算,就象对逻辑语句进行运算一样。

• 语言变量可以看作是用某种自然语言和人工语言的词语或句子来表示变量的值和描述变量间的内在联系的一种系统化的方法

• 模糊集合和语言变量可用于量化自然语言的含义,因而可用来处理具有指定值的语言变量。

• Fuzzy logic=computing with words

Page 69: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 69

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

语言变量( 2)• 模糊逻辑的核心概念是语言变量。• 模糊逻辑的基本思想是将常规数值变量模糊化,使

变量成为以定性术语(也称语言值)为值域的语言变量

Page 70: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 70

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 1)• A fuzzy rule can be defined as a conditional statement as below.

IF x is A

THEN y is B

• Differences between classical and fuzzy rules.

IF height is > 1.80

THEN select_for_team

• In fuzzy rules;

IF height is tall

THEN select_for_team

Page 71: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 71

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 2)• A fuzzy rule can have multiple antecedents.

IF height is tall

AND age is small

THEN select_for_team

• Or, another example

IF service is excellent

OR food is delicious

THEN tip is generous

Page 72: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 72

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 3)• 模糊推理过程

Crisp Input

Fuzzy Input

Fuzzy Output

Crisp Output

Fuzzification

Rule Evaluation

Defuzzification

Input Membership Functions

Rules / Inferences

Output Membership Functions

Page 73: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 73

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 4)• 常用的隶属函数 :

)(x )(xx x

(a) (b)

)(x )(x

(c) (d)

Page 74: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 74

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 5)• 模糊化 : 模糊化借助于输入模糊集合的隶属函数转变输入值

为隶属度,即模糊化是根据模糊集合转变输入值为隶属度值的过程。

• 模糊估值 : 由于模糊控制规则的部分匹配特性和规则的前提条件相重叠的事实,通常在一个时刻可能有多于一条的模糊规则被激活,用来决定执行哪个控制规则的方法称为冲突消解过程。规则估值过程确定了每个规则被满足的程度。

• 常用的方法 :

– MinMax 方法 – Product 方法– BoundedSum 方法

Page 75: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 75

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 6)• 清晰化 :

通过规则估值得到规则强度后,仍然需要进一步的处理,这个处理给出就是输出的清晰化。这一必须执行的过程,要生成非模糊化的控制动作,为了从截取后的输出模糊集中确定出一个清晰的值,必须首先合并这些输出模糊集。这是通过把所有的输出模糊连接起来,并且在所有的点上取大值来进行的。

• 常用方法 :

– 重心法– Truth Value Flow

Page 76: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 76

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 7)

• Two Inputs (x, y) and one output (z)

• Membership functions:

low(t) = 1 - ( t / 10 )

high(t) = t / 10

Low High

1

0tX=0.32 Y=0.61

0.32

0.68

Low(x) = 0.68, High(x) = 0.32, Low(y) = 0.39, High(y) = 0.61

Crisp Inputs

Page 77: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 77

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 8)

规则库 :

• Rule 1: If x is low AND y is low Then z is high

• Rule 2: If x is low AND y is high Then z is low

• Rule 3: If x is high AND y is low Then z is low

• Rule 4: If x is high AND y is high Then z is high

Page 78: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 78

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 9)

推理 :

• Rule1: low(x)=0.68, low(y)=0.39 => high(z)=MIN(0.68,0.39)=0.39

• Rule2: low(x)=0.68, high(y)=0.61 => low(z)=MIN(0.68,0.61)=0.61

• Rule3: high(x)=0.32, low(y)=0.39 => low(z)=MIN(0.32,0.39)=0.32

• Rule4: high(x)=0.32, high(y)=0.61 => high(z)=MIN(0.32,0.61)=0.32

Page 79: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 79

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 10)

估值 :

• Low(z) = MAX(rule2, rule3) = MAX(0.61, 0.32) = 0.61

• High(z) = MAX(rule1, rule4) = MAX(0.39, 0.32) = 0.39

Low High1

0

t

0.61

0.39

Page 80: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 80

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 11)

清晰化 :

Center of Gravity

Low High1

0

0.61

0.39

Crisp output

Center of Gravity

Page 81: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 81

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 12)

清晰化 :

Center of Gravity

Page 82: 人工智能 Artificial Intelligence

Artificial Intelligence Uncertainty Reasoning: 82

©

Gra

du

ate

Un

ive

rsit

y ,

Ch

ines

e a

cad

emy

of

Sci

ence

s.

模糊推理( 13)