![人工智能08不确定性课件_第1页](http://file4.renrendoc.com/view/f00ba41567af020b75c098cef8a4d25e/f00ba41567af020b75c098cef8a4d25e1.gif)
![人工智能08不确定性课件_第2页](http://file4.renrendoc.com/view/f00ba41567af020b75c098cef8a4d25e/f00ba41567af020b75c098cef8a4d25e2.gif)
![人工智能08不确定性课件_第3页](http://file4.renrendoc.com/view/f00ba41567af020b75c098cef8a4d25e/f00ba41567af020b75c098cef8a4d25e3.gif)
![人工智能08不确定性课件_第4页](http://file4.renrendoc.com/view/f00ba41567af020b75c098cef8a4d25e/f00ba41567af020b75c098cef8a4d25e4.gif)
![人工智能08不确定性课件_第5页](http://file4.renrendoc.com/view/f00ba41567af020b75c098cef8a4d25e/f00ba41567af020b75c098cef8a4d25e5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
手写数字识别手写数字识别1文本分类文本分类2图像分割图像分割3第八章Uncertainty
不确定性对应教材第13章第八章Uncertainty
不确定性对应教材第13章4本章大纲Uncertainty不确定性Probability概率SyntaxandSemantics语法与语义Inference推理IndependenceandBayes‘Rule
—独立性及贝叶斯法则
本章大纲Uncertainty不确定性5不确定性智能体几乎从来无法了解关于其环境的全部事实。因此其必须在不确定的环境下行动。概率推理
得到了某一证据,那么有多大的几率结论为真?
例如:我颈部痛;我得脑膜炎的可能有多大?不确定性智能体几乎从来无法了解关于其环境的全部事实。因此其必6不确定性假如有如下规则:
iftoothache(牙疼)then原因是cavity(牙齿有洞)但并不是所有牙疼的病人都是因为牙齿有洞,所以我们可以建立如下规则:
iftoothacheand¬gum-disease(牙龈疾病)and
¬filling(补牙)and...thenproblem=cavity以上规则是复杂的;更好的方法:
iftoothachethenproblemiscavitywith0.8probability
orP(cavity|toothache)=0.8
theprobabilityofcavityis0.8giventoothacheisobserved不确定性假如有如下规则:
iftoothache(牙疼)7不确定性 LetactionAt=离起飞时间提前t分钟动身去机场
At会使我准时到达机场吗?
Problems:
1.partialobservability/部分可观察性(roadstate,otherdrivers‘plans)
2.noisysensors(trafficreports)
3.行动结果的不确定性(flattire,etc.)
4.immensecomplexityofmodelingandpredictingtraffic
因此一个纯粹的逻辑描述方法:
1.risksfalsehood(错误风险):“A25
willgetmethereontime”,or
2.leadstoconclusionsthataretooweakfordecisionmaking:
“A25
willgetmethereontimeifthere’snoaccidentonthebridgeanditdoesn‘trainandmytiresremainintactetcetc.”
(A1440
mightreasonablybesaidtogetmethereontimebutI’dhavetostayovernightintheairport…)不确定性 LetactionAt=离起飞时间提前t分8世界与模型中的不确定性Trueuncertainty:rulesareprobabilisticinnature
掷骰子,抛硬币惰性:把所有意外的规则都列举出来是很困难的
花费太多时间来确定所有的相关因素
这些规则过于繁杂而难以使用理论的无知:某些领域中还没有完整的理论
(e.g.,medicaldiagnosis)实践的无知:掌握了所有规则但是
并不是所有的相关信息都能被收集到世界与模型中的不确定性Trueuncertainty:r9处理不确定性的方法概率理论作为一种正式的方法for:
不确定知识的表示和推理
命题中的模型信度(event,conclusion,diagnosis,etc.)
给定可获得的证据,
A25
willgetmethereontimewithprobability0.04概率是不确定性的语言
现代AI的中心支柱处理不确定性的方法概率理论作为一种正式的方法for:
不确定10Probability概率概率理论提供了一种方法以概括来自我们的惰性和无知的不确定性。Probabilisticassertionssummarizeeffectsof
Laziness(惰性):failuretoenumerateexceptions(例外),qualifications(条件),etc.
Ignorance(理论的无知):lackofrelevantfacts,initialconditions,etc.Subjectiveprobability(主观概率):
Probabilitiesrelatepropositions(命题)toagent'sownstateof
knowledge
e.g.,P(A25|noreportedaccidents)=0.06Thesearenotassertions(断言)abouttheworld命题的概率随着新证据的发现而改变:
e.g.,P(A25|noreportedaccidents,5a.m.)=0.15Probability概率概率理论提供了一种方法以概括来自我11不确定条件下的决策假设下述概率是真的:
P(A25getsmethereontime|…)=0.04
P(A90getsmethereontime|…)=0.70
P(A120getsmethereontime|…)=0.95
P(A1440getsmethereontime|…)=0.9999Whichactiontochoose?
Dependsonmypreferences(偏好)formissingflightvs.time
spentwaiting,etc.
Utilitytheory(效用理论)用来对偏好进行表示和推理
Decisiontheory=probabilitytheory+utilitytheory
决策理论=概率理论+效用理论不确定条件下的决策假设下述概率是真的:12Syntax语法基本元素:randomvariable(随机变量)
Arandomvariableissomeaspectoftheworldaboutwhichwe(may)haveuncertainty
通常大写e.g.,Cavity,Weather,Temperature类似于命题逻辑:未知世界被随机变量的赋值所定义Booleanrandomvariables(布尔随机变量)
e.g.,Cavity(牙洞)(doIhaveacavity?)Discreterandomvariables(离散随机变量)
e.g.,Weatherisoneof<sunny,rainy,cloudy,snow>定义域mustbeexhaustive(穷尽的)andmutuallyexclusive(互斥的)Continuousrandomvariables(连续随机变量)
e.g.,Temp=21.6;alsoallow,e.g.,Temp<22.0Syntax语法基本元素:randomvariable(13SyntaxElementaryproposition(命题)constructedbyassignmentofavaluetoarandomvariable:e.g.,Weather=sunny,Cavity=false
(简写为¬cavity)Complexpropositionsformedfromelementarypropositionsandstandardlogicalconnectivese.g.,Weather=sunny∨Cavity=falseSyntaxElementaryproposition(命14SyntaxAtomicevent:Acompletespecificationofthestateof
theworldaboutwhichtheagentisuncertain原子事件:对智能体无法确定的世界状态的一个完
整的详细描述。E.g.,iftheworldconsistsofonlytwoBooleanvariablesCavity
andToothache,thenthereare4distinctatomicevents:
Cavity=false∧Toothache=false
Cavity=false∧Toothache=true
Cavity=true∧Toothache=false
Cavity=true∧Toothache=true
Atomiceventsaremutuallyexclusiveandexhaustive
穷尽和互斥SyntaxAtomicevent:Acomplete15概率公理对任意命题A,B
0≤P(A)≤1
P(true)=1andP(false)=0
P(A∨B)=P(A)+P(B)-P(A∧B)
概率公理对任意命题A,B
0≤P(A)≤1
P16Priorprobability(先验概率)Priororunconditionalprobabilities(无条件概率)ofpropositions在没有任何其它信息存在的情况下关于命题的信度
e.g.,P(Cavity=true)=0.1andP(Weather=sunny)=0.72correspondtobeliefpriortoarrivalofany(new)evidenceProbabilitydistributiongivesvaluesforallpossibleassignments:概率分布给出一个随机变量所有可能取值的概率
P(Weather)=<0.72,0.1,0.08,0.1>(normalized(归一化的),i.e.,sumsto1)Jointprobabilitydistributionforasetofrandomvariablesgivestheprobabilityofeveryatomiceventonthoserandomvariables(i.e.,everysamplepoint)联合概率分布给出一个随机变量集的值的全部组合的概率
P(Weather,Cavity)=a4×2matrixofvalues:EveryquestionaboutadomaincanbeansweredbythejointdistributionbecauseeveryeventisasumofsamplepointsPriorprobability(先验概率)Prioro17连续变量的概率Expressdistributionasaparameterized(参数化的)functionofvalue:P(X=x)=U[18,26](x)=uniform(均匀分布)densitybetween18and26连续变量的概率Expressdistributionas18连续变量的概率连续变量的概率19MarginalDistributions(边缘概率分布)Marginaldistributionsaresub-tableswhicheliminatevariablesMarginalization(summingout):CombinecollapsedrowsbyaddingMarginalDistributions(边缘概率分布)20Conditionalprobability(条件概率)Conditionalorposteriorprobabilities(后验概率)P(a|b)
证据累积过程的形式化和发现新证据后的概率更新
当一个命题为真的条件下,指定命题的概率
e.g.,P(cavity|toothache)=0.8
i.e.,鉴于牙疼是已知证据
(Notationforconditionaldistributions(条件概率分布):
P(cavity|toothache)=asinglenumber
P(Cavity,Toothache)=2x2tablesummingto1
P(Cavity|Toothache)=2-elementvectorof2-elementvectorsIfweknowmore,e.g.,cavityisalsogiven,thenwehave
P(cavity|toothache,cavity)=1
新证据可能是不相关的,可以简化,e.g.,
P(cavity|toothache,sunny)=P(cavity|toothache)=0.8Conditionalprobability(条件概率)C21条件概率定义条件概率为:
P(a|b)=P(a∧b)/P(b)ifP(b)>0Productrule(乘法规则)
givesanalternativeformulation:
P(a∧b)=P(a|b)P(b)=P(b|a)P(a)Ageneralversionholdsforwholedistributions,e.g.,
P(Weather,Cavity)=P(Weather|Cavity)P(Cavity)(Viewasasetof4×2equations,notmatrixmultiplication)Chainrule(链式法则)isderivedbysuccessiveapplicationofproductrule:条件概率定义条件概率为:
P(a|b)=P(a∧22条件概率条件概率跟标准概率一样,forexample:
0<=P(a|e)<=1
conditionalprobabilitiesarebetween0and1inclusive
P(a1|e)+P(a2|e)+...+P(ak|e)=1
conditionalprobabilitiessumto1wherea1,…,ak
areallvaluesinthedomainofrandomvariableA
P(¬a|e)=1-P(a|e)
negationforconditionalprobabilities条件概率条件概率跟标准概率一样,forexample:
23通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr24通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr25通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr26通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):通过枚举的推理Startwiththejointpr27Normalization(归一化)Denominator(分母)canbeviewedasanormalizationconstantα
P(Cavity|toothache)=αP(Cavity,toothache)
=α[P(Cavity,toothache,catch)+P(Cavity,toothache,¬catch)]
=α[<0.108,0.016>+<0.012,0.064>]
=α<0.12,0.08>=<0.6,0.4>
Generalidea:computedistributiononqueryvariablebyfixing
evidencevariables(证据变量)andsummingoverhidden
variables(未观测变量)Normalization(归一化)Denominator(28通过枚举的推理Typically,weareinterestedin
theposteriorjointdistributionofthequeryvariables(查询变量)Y
givenspecificvaluesefortheevidencevariables(证据变量)ELetthehiddenvariables(未观测变量)beH=X-Y–EThentherequiredsummationofjointentriesisdonebysummingoutthehiddenvariables:
P(Y|E=e)=αP(Y,E=e)=αΣhP(Y,E=e,H=h)ThetermsinthesummationarejointentriesbecauseY,EandHtogetherexhaustthesetofrandomvariables(Y,E,H构成了域中所有变量的完整集合)Obviousproblems:
1.Worst-casetimecomplexityO(dn)wheredisthelargestarity
2.SpacecomplexityO(dn)tostorethejointdistribution
3.HowtofindthenumbersforO(dn)entries?通过枚举的推理Typically,weareinter29Independence(独立性)AandBareindependentiff
P(A|B)=P(A)orP(B|A)=P(B)orP(A,B)=P(A)P(B)E.g:rollof2die:P({1},{3})=1/6*1/6=1/36P(Toothache,Catch,Cavity,Weather)=P(Toothache,Catch,Cavity)P(Weather)32entriesreducedto12;fornindependentbiasedcoins,O(2n)→O(n)Absoluteindependencepowerfulbutrare绝对独立强大但罕见Dentistry(牙科领域)isalargefieldwithhundredsofvariables,noneofwhichareindependent.Whattodo?Independence(独立性)AandBarei30独立的滥用天真的数学笑话:一个著名统计学家永远不会坐飞机旅行,因为他研究了航空旅行和估计,任何给定的航班上有炸弹的可能性是一百万分之一,他不准备接受这些可能性。有一天,一位同时在远离家乡的会议上遇到他。“你怎么到这里的?坐火车吗?”“不,我飞过来的”“Whataboutthepossibilityofabomb?”“Well,Ibeganthinkingthatiftheoddsofonebombare1:million,thentheoddsoftwobombsare(1/1,000,000)x(1/1,000,000).Thisisavery,verysmallprobability,whichIcanaccept.SonowIbringmyownbombalong!”独立的滥用天真的数学笑话:31Conditionalindependence
条件独立性Randomvariablescanbedependent,butconditionally
independent
Example:Yourhousehasanalarm
NeighborJohnwillcallwhenhehearsthealarm
NeighborMarywillcallwhenshehearsthealarm
AssumeJohnandMarydon’ttalktoeachother
IsJohnCallindependentofMaryCall?
No–IfJohncalled,itislikelythealarmwentoff,whichincreasestheprobabilityofMarycalling
P(MaryCall|JohnCall)≠P(MaryCall)Conditionalindependence
条件独立性32条件独立性But,ifweknowthestatusofthealarm,JohnCallwillnot
affectwhetherornotMarycalls
P(MaryCall|Alarm,JohnCall)=P(MaryCall|Alarm)
WesayJohnCallandMaryCallareconditionally
independentgivenAlarm
Ingeneral,“AandBareconditionallyindependentgivenC”
means:
P(A|B,C)=P(A|C)
P(B|A,C)=P(B|C)
P(A,B|C)=P(A|C)P(B|C)条件独立性But,ifweknowthestatu33条件独立性P(Toothache,Cavity,Catch)has23-1=7independententries专业领域知识:Cavitydirectlycausestoothacheandprobe-catches.IfIhave
acavity,theprobabilitythattheprobecatchesinitdoesn‘tdependonwhether
Ihaveatoothache:
(1)P(catch|toothache,cavity)=P(catch|cavity)ThesameindependenceholdsifIhaven’tgotacavity:
(2)P(catch|toothache,¬cavity)=P(catch|¬cavity)CatchisconditionallyindependentofToothachegivenCavity:
P(Catch|Toothache,Cavity)=P(Catch|Cavity)Equivalentstatements:
P(Toothache|Catch,Cavity)=P(Toothache|Cavity)
P(Toothache,Catch|Cavity)=P(Toothache|Cavity)P(Catch|Cavity)条件独立性P(Toothache,Cavity,Catc34条件独立性Writeoutfulljointdistributionusingchainrule:
P(Toothache,Catch,Cavity)
=P(Toothache|Catch,Cavity)P(Catch,Cavity)
=P(Toothache|Catch,Cavity)P(Catch|Cavity)P(Cavity)
=P(Toothache|Cavity)P(Catch|Cavity)P(Cavity)
I.e.,2+2+1=5independentnumbersInmostcases,theuseofconditionalindependencereducesthesizeofthe
representationofthejointdistributionfromexponentialinntolinearinn.在大多数情况下,使用条件独立性能将全联合概率的表示由n的指数关系减为n的线性关系。Conditionalindependenceisourmostbasicandrobustformofknowledgeaboutuncertainenvironments.条件独立性Writeoutfulljointdist35Bayes’Rule(贝叶斯法则)Bayes’Rule(贝叶斯法则)36Bayes’Rule(贝叶斯法则)乘法原则⇒Bayes‘rule:orindistributionform
为什么该法则非常有用?
将条件倒转
通常一个条件是复杂的,一个是简单的
许多系统的基础(e.g.语音识别)现代AI基础!Bayes’Rule(贝叶斯法则)乘法原则37Bayes’Rule(贝叶斯法则)Usefulforassessingdiagnosticprobability(诊断概率)fromcausalprobability(因果概率):E.g.,letMbemeningitis(脑膜炎),Sbestiffneck(脖子僵硬):Note:脑膜炎的后验概率依然非常小!Note:依然要先检测脖子僵硬!Why?Bayes’Rule(贝叶斯法则)38Bayes’RuleinPracticeBayes’RuleinPractice39使用贝叶斯法则:IH=“havingaheadache“头痛F=“comingdownwithFlu”流感
P(H)=1/10
P(F)=1/40
P(H|F)=1/2有一天你早上醒来发现头很痛,于是得到以下结论:“因为得了流感以后50%的几率会引起头痛,所以我有50%的几率得了流感”Isthisreasoningcorrect?使用贝叶斯法则:IH=“havingaheadac40使用贝叶斯法则:IH="havingaheadache“F="comingdownwithFlu"
P(H)=1/10
P(F)=1/40
P(H|F)=1/2TheProblem:
P(F|H)=?
使用贝叶斯法则:IH="havingaheadac41使用贝叶斯法则:IH="havingaheadache“F="comingdownwithFlu"
P(H)=1/10
P(F)=1/40
P(H|F)=1/2TheProblem:
P(F|H)=P(H|F)P(F)/P(H)
=1/8≠P(H|F)
使用贝叶斯法则:IH="havingaheadac42使用贝叶斯法则:II在一个包裹里有2个信封
一个信封里有一个红球(worth$100)和一个黑球
另一个信封里有2个黑球.黑球一文不值然后你随机拿出一个信封,并随机拿出一个球 –it’sblack此时此刻给你个机会换一个信封.是换呢还是换呢还是换呢?使用贝叶斯法则:II在一个包裹里有2个信封
一个信43使用贝叶斯法则:IIE:envelope,1=(R,B),2=(B,B)B:theeventofdrawingablackball
P(E|B)=P(B|E)*P(E)/P(B)WewanttocompareP(E=1|B)vs.P(E=2|B)
P(B|E=1)=0.5,P(B|E=2)=1
P(E=1)=P(E=2)=0.5
P(B)=P(B|E=1)P(E=1)+P(B|E=2)P(E=2)=(.5)(.5)+(1)(.5)=.75
P(E=1|B)=P(B|E=1)P(E=1)/P(B)=(.5)(.5)/(.75)=1/3
P(E=2|B)=P(B|E=2)P(E=2)/P(B)=(1)(.5)/(.75)=2/3因此在已发现一个黑球后,该信封是1的后验概率(thusworth$100)比信封是2的后验概率低
所以还是换吧使用贝叶斯法则:IIE:envelope,1=(R,B44课堂测验一名医生做了一个具有99%可靠性的测试:也就是说,99%的病人其检测呈阳性,99%的健康人士检测呈阴性.该医生估计1%的人类病了。。。
Question:一个患者检测呈阳性.该患者得病的几率是多少?
0-25%,25-75%,75-95%,or95-100%?
课堂测验一名医生做了一个具有99%可靠性的测试:也就是说,45课堂测验Adoctorperformsatestthathas99%reliability,i.e.,99%of
peoplewhoaresicktestpositive,and99%ofpeoplewhoarehealthytestnegative.Thedoctorestimatesthat1%ofthepopulationissick.
Question:Apatienttestspositive.Whatisthechancethatthepatientissick?
0-25%,25-75%,75-95%,or95-100%?
Intuitiveanswer:99%;Correctanswer:50%课堂测验Adoctorperformsatestt46Bayes’rulewith多重证据和条件独立性P(Cavity|toothache∧catch)
=αP(toothache∧catch|Cavity)P(Cavity)
=αP(toothache|Cavity)P(catch|Cavity)P(Cavity)ThisisanexampleofanaïveBayesmodel(朴素贝叶斯模型):Totalnumberofparameters(参数)islinearinnBayes’rulewith多重证据和条件独立性P(C47链式法则全联合分布using链式法则:
P(Toothache,Catch,Cavity)
=P(Toothache|Catch,Cavity)P(Catch,Cavity)
=P(Toothache|Catch,Cavity)P(Catch|Cavity)P(Cavity)
=P(Toothache|Cavity)P(Catch|Cavity)P(Cavity)图模型:
•Eachvariableisanode
•Theparentsofanodearethe
othervariableswhichthe
decomposedjointconditionson
•MUCHmoreonthistocome!链式法则全联合分布using链式法则:
P(Tootha48概率分布从哪来?IdeaOne:人类,领域专家
E.g.what’sP(raining|cold)?
IdeaTwo:简单事实和一些代数学
使用链式法则和独立性来试着计算联合分布概率分布从哪来?IdeaOne:人类,领域专家
E49概率分布从哪来?IdeaThree:从数据里学习出来的!
Agoodchunkofmachinelearningresearchisessentiallyaboutvariouswaysoflearningvariousformsofthem!
概率分布从哪来?IdeaThree:从数据里学习出来的!50Estimation估计怎样去估计一个随机变量X的分布?
Maximumlikelihood(最大似然):
从现实世界中收集观察值
Foreachvaluex,lookattheempiricalrateofthatvalue:
ThisestimateistheonewhichmaximizesthelikelihoodofthedataEstimation估计怎样去估计一个随机变量X的分布?
51Estimation估计Problemswith最大似然估计:
如果我抛一次硬币,是正面heads,那么对P(heads)的估计是多少?
WhatifIflipit50timeswith27heads?
WhatifIflip10Mtimeswith8Mheads?
Basicidea:
我们对一些参数有先验期望值(here,theprobabilityofheads)
在缺少证据时,我们倾向先验值
若给定很多证据,则应该以数据为准Estimation估计Problemswith最大似然52SummaryProbabilityisarigorousformalismforuncertainknowledge概率是对不确定知识一种严密的形式化方法Jointprobabilitydistributionspecifiesprobabilityofeveryatomicevent全联合概率分布指定了对随机变量的每种完全赋值,即每个原子事件的概率Queriescanbeansweredbysummingoveratomicevents可以通过把对应于查询命题的原子事件的条目相加的方式来回答查询Fornontrivialdomains,wemustfindawaytoreducethejointsizeIndependenceandconditionalindependenceprovidethetoolsSummaryProbabilityisarigoro53作业13.8,13.11,13.16,13.18(不交)
作业13.8,13.11,13.16,13.18(不54手写数字识别手写数字识别55文本分类文本分类56图像分割图像分割57第八章Uncertainty
不确定性对应教材第13章第八章Uncertainty
不确定性对应教材第13章58本章大纲Uncertainty不确定性Probability概率SyntaxandSemantics语法与语义Inference推理IndependenceandBayes‘Rule
—独立性及贝叶斯法则
本章大纲Uncertainty不确定性59不确定性智能体几乎从来无法了解关于其环境的全部事实。因此其必须在不确定的环境下行动。概率推理
得到了某一证据,那么有多大的几率结论为真?
例如:我颈部痛;我得脑膜炎的可能有多大?不确定性智能体几乎从来无法了解关于其环境的全部事实。因此其必60不确定性假如有如下规则:
iftoothache(牙疼)then原因是cavity(牙齿有洞)但并不是所有牙疼的病人都是因为牙齿有洞,所以我们可以建立如下规则:
iftoothacheand¬gum-disease(牙龈疾病)and
¬filling(补牙)and...thenproblem=cavity以上规则是复杂的;更好的方法:
iftoothachethenproblemiscavitywith0.8probability
orP(cavity|toothache)=0.8
theprobabilityofcavityis0.8giventoothacheisobserved不确定性假如有如下规则:
iftoothache(牙疼)61不确定性 LetactionAt=离起飞时间提前t分钟动身去机场
At会使我准时到达机场吗?
Problems:
1.partialobservability/部分可观察性(roadstate,otherdrivers‘plans)
2.noisysensors(trafficreports)
3.行动结果的不确定性(flattire,etc.)
4.immensecomplexityofmodelingandpredictingtraffic
因此一个纯粹的逻辑描述方法:
1.risksfalsehood(错误风险):“A25
willgetmethereontime”,or
2.leadstoconclusionsthataretooweakfordecisionmaking:
“A25
willgetmethereontimeifthere’snoaccidentonthebridgeanditdoesn‘trainandmytiresremainintactetcetc.”
(A1440
mightreasonablybesaidtogetmethereontimebutI’dhavetostayovernightintheairport…)不确定性 LetactionAt=离起飞时间提前t分62世界与模型中的不确定性Trueuncertainty:rulesareprobabilisticinnature
掷骰子,抛硬币惰性:把所有意外的规则都列举出来是很困难的
花费太多时间来确定所有的相关因素
这些规则过于繁杂而难以使用理论的无知:某些领域中还没有完整的理论
(e.g.,medicaldiagnosis)实践的无知:掌握了所有规则但是
并不是所有的相关信息都能被收集到世界与模型中的不确定性Trueuncertainty:r63处理不确定性的方法概率理论作为一种正式的方法for:
不确定知识的表示和推理
命题中的模型信度(event,conclusion,diagnosis,etc.)
给定可获得的证据,
A25
willgetmethereontimewithprobability0.04概率是不确定性的语言
现代AI的中心支柱处理不确定性的方法概率理论作为一种正式的方法for:
不确定64Probability概率概率理论提供了一种方法以概括来自我们的惰性和无知的不确定性。Probabilisticassertionssummarizeeffectsof
Laziness(惰性):failuretoenumerateexceptions(例外),qualifications(条件),etc.
Ignorance(理论的无知):lackofrelevantfacts,initialconditions,etc.Subjectiveprobability(主观概率):
Probabilitiesrelatepropositions(命题)toagent'sownstateof
knowledge
e.g.,P(A25|noreportedaccidents)=0.06Thesearenotassertions(断言)abouttheworld命题的概率随着新证据的发现而改变:
e.g.,P(A25|noreportedaccidents,5a.m.)=0.15Probability概率概率理论提供了一种方法以概括来自我65不确定条件下的决策假设下述概率是真的:
P(A25getsmethereontime|…)=0.04
P(A90getsmethereontime|…)=0.70
P(A120getsmethereontime|…)=0.95
P(A1440getsmethereontime|…)=0.9999Whichactiontochoose?
Dependsonmypreferences(偏好)formissingflightvs.time
spentwaiting,etc.
Utilitytheory(效用理论)用来对偏好进行表示和推理
Decisiontheory=probabilitytheory+utilitytheory
决策理论=概率理论+效用理论不确定条件下的决策假设下述概率是真的:66Syntax语法基本元素:randomvariable(随机变量)
Arandomvariableissomeaspectoftheworldaboutwhichwe(may)haveuncertainty
通常大写e.g.,Cavity,Weather,Temperature类似于命题逻辑:未知世界被随机变量的赋值所定义Booleanrandomvariables(布尔随机变量)
e.g.,Cavity(牙洞)(doIhaveacavity?)Discreterandomvariables(离散随机变量)
e.g.,Weatherisoneof<sunny,rainy,cloudy,snow>定义域mustbeexhaustive(穷尽的)andmutuallyexclusive(互斥的)Continuousrandomvariables(连续随机变量)
e.g.,Temp=21.6;alsoallow,e.g.,Temp<22.0Syntax语法基本元素:randomvariable(67SyntaxElementaryproposition(命题)constructedbyassignmentofavaluetoarandomvariable:e.g.,Weather=sunny,Cavity=false
(简写为¬cavity)Complexpropositionsformedfromelementarypropositionsandstandardlogicalconnectivese.g.,Weather=sunny∨Cavity=falseSyntaxElementaryproposition(命68SyntaxAtomicevent:Acompletespecificationofthestateof
theworldaboutwhichtheagentisuncertain原子事件:对智能体无法确定的世界状态的一个完
整的详细描述。E.g.,iftheworldconsistsofonlytwoBooleanvariablesCavity
andToothache,thenthereare4distinctatomicevents:
Cavity=false∧Toothache=false
Cavity=false∧Toothache=true
Cavity=true∧Toothache=false
Cavity=true∧Toothache=true
Atomiceventsaremutuallyexclusiveandexhaustive
穷尽和互斥SyntaxAtomicevent:Acomplete69概率公理对任意命题A,B
0≤P(A)≤1
P(true)=1andP(false)=0
P(A∨B)=P(A)+P(B)-P(A∧B)
概率公理对任意命题A,B
0≤P(A)≤1
P70Priorprobability(先验概率)Priororunconditionalprobabilities(无条件概率)ofpropositions在没有任何其它信息存在的情况下关于命题的信度
e.g.,P(Cavity=true)=0.1andP(Weather=sunny)=0.72correspondtobeliefpriortoarrivalofany(new)evidenceProbabilitydistributiongivesvaluesforallpossibleassignments:概率分布给出一个随机变量所有可能取值的概率
P(Weather)=<0.72,0.1,0.08,0.1>(normalized(归一化的),i.e.,sumsto1)Jointprobabilitydistributionforasetofrandomvariablesgivestheprobabilityofeveryatomiceventonthoserandomvariables(i.e.,everysamplepoint)联合概率分布给出一个随机变量集的值的全部组合的概率
P(Weather,Cavity)=a4×2matrixofvalues:EveryquestionaboutadomaincanbeansweredbythejointdistributionbecauseeveryeventisasumofsamplepointsPriorprobability(先验概率)Prioro71连续变量的概率Expressdistributionasaparameterized(参数化的)functionofvalue:P(X=x)=U[18,26](x)=uniform(均匀分布)densitybetween18and26连续变量的概率Expressdistributionas72连续变量的概率连续变量的概率73MarginalDistributions(边缘概率分布)Marginaldistributionsaresub-tableswhicheliminatevariablesMarginalization(summingout):CombinecollapsedrowsbyaddingMarginalDistributions(边缘概率分布)74Conditionalprobability(条件概率)Conditionalorposteriorprobabilities(后验概率)P(a|b)
证据累积过程的形式化和发现新证据后的概率更新
当一个命题为真的条件下,指定命题的概率
e.g.,P(cavity|toothache)=0.8
i.e.,鉴于牙疼是已知证据
(Notationforconditionaldistributions(条件概率分布):
P(cavity|toothache)=asinglenumber
P(Cavity,Toothache)=2x2tablesummingto1
P(Cavity|Toothache)=2-elementvectorof2-elementvectorsIfweknowmore,e.g.,cavityisalsogiven,thenwehave
P(cavity|toothache,cavity)=1
新证据可能是不相关的,可以简化,e.g.,
P(cavity|toothache,sunny)=P(cavity|toothache)=0.8Conditionalprobability(条件概率)C75条件概率定义条件概率为:
P(a|b)=P(a∧b)/P(b)ifP(b)>0Productrule(乘法规则)
givesanalternativeformulation:
P(a∧b)=P(a|b)P(b)=P(b|a)P(a)Ageneralversionholdsforwholedistributions,e.g.,
P(Weather,Cavity)=P(Weather|Cavity)P(Cavity)(Viewasasetof4×2equations,notmatrixmultiplication)Chainrule(链式法则)isderivedbysuccessiveapplicationofproductrule:条件概率定义条件概率为:
P(a|b)=P(a∧76条件概率条件概率跟标准概率一样,forexample:
0<=P(a|e)<=1
conditionalprobabilitiesarebetween0and1inclusive
P(a1|e)+P(a2|e)+...+P(ak|e)=1
conditionalprobabilitiessumto1wherea1,…,ak
areallvaluesinthedomainofrandomvariableA
P(¬a|e)=1-P(a|e)
negationforconditionalprobabilities条件概率条件概率跟标准概率一样,forexample:
77通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr78通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr79通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):Foranypropositionφ,sumtheatomiceventswhereitistrue:一个命题的概率等于所有当它为真时的原子事件的概率和
通过枚举的推理Startwiththejointpr80通过枚举的推理Startwiththejointprobabilitydistribution(全联合概率分布):通过枚举的推理Startwiththejointpr81Normalization(归一化)Denominator(分母)canbeviewedasanormalizationconstantα
P(Cavity|toothache)=αP(Cavity,toothache)
=α[P(Cavity,toothache,catch)+P(Cavity,toothache,¬catch)]
=α[<0.108,0.016>+<0.012,0.064>]
=α<0.12,0.08>=<0.6,0.4>
Generalidea:computedistributiononqueryvariablebyfixing
evidencevariables(证据变量)andsummingoverhidden
variables(未观测变量)Normalization(归一化)Denominator(82通过枚举的推理Typically,weareinterestedin
theposteriorjointdistributionofthequeryvariables(查询变量)Y
givenspecificvaluesefortheevidencevariables(证据变量)ELetthehiddenvariables(未观测变量)beH=X-Y–EThentherequiredsummationofjointentriesisdonebysummingoutthehiddenvariables:
P(Y|E=e)=αP(Y,E=e)=αΣhP(Y,E=e,H=h)ThetermsinthesummationarejointentriesbecauseY,EandHtogetherexhaustthesetofrandomvariables(Y,E,H构成了域中所有变量的完整集合)Obviousproblems:
1.Worst-casetimecomplexityO(dn)wheredisthelargestarity
2.SpacecomplexityO(dn)tostorethejointdistribution
3.HowtofindthenumbersforO(dn)entries?通过枚举的推理Typically,weareinter83Independence(独立性)AandBareindependentiff
P(A|B)=P(A)orP(B|A)=P(B)orP(A,B)=P(A)P(B)E.g:rollof2die:P({1},{3})=1/6*1/6=1/36P(Toothache,Catch,Cavity,Weather)=P(Toothache,Catch,Cavity)P(Weather)32entriesreducedto12;fornindependentbiasedcoins,O(2n)→O(n)Absoluteindependencepowerfulbutrare绝对独立强大但罕见Dentistry(牙科领域)isalargefieldwithhundredsofvariables,noneofwhichareindependent.Whattodo?Independence(独立性)AandBarei84独立的滥用天真的数学笑话:一个著名统计学家永远不会坐飞机旅行,因为他研究了航空旅行和估计,任何给定的航班上有炸弹的可能性是一百万分之一,他不准备接受这些可能性。有一天,一位同时在远离家乡的会议上遇到他。“你怎么到这里的?坐火车吗?”“不,我飞过来的”“Whataboutthepossibilityofabomb?”“Well,Ibeganthinkingthatiftheoddsofonebombare1:million,thentheoddsoftwobombsare(1/1,000,000)x(1/1,000,000).Thisisavery,verysmallprobability,whichIcan
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年普通整流管芯片项目可行性研究报告
- 2025至2031年中国带棚架松式络筒机行业投资前景及策略咨询研究报告
- 2025年室内型电子显示屏幕项目可行性研究报告
- 2025年吨包装机项目可行性研究报告
- 2025至2031年中国丁维钙粉行业投资前景及策略咨询研究报告
- 2025年三氯乙基磷酸酯项目可行性研究报告
- 2025至2030年香水木大双龙船项目投资价值分析报告
- 2025至2030年中国铝条插角件数据监测研究报告
- 2025至2030年线性增压内压力试验机项目投资价值分析报告
- 2025至2030年环氧树脂地坪面层涂料项目投资价值分析报告
- 牛津书虫系列1-6级 双语 4B-03.金银岛中英对照
- 2024-2025学年深圳市南山区六年级数学第一学期期末学业水平测试试题含解析
- 2024-2030年中国免疫细胞存储行业市场发展分析及竞争形势与投资战略研究报告
- 工贸行业企业安全生产标准化建设实施指南
- 机械基础(少学时)(第三版) 课件全套 第0-15章 绪论、带传动-气压传动
- T-CACM 1560.6-2023 中医养生保健服务(非医疗)技术操作规范穴位贴敷
- 07J912-1变配电所建筑构造
- 锂离子电池串并联成组优化研究
- 人教版小学数学一年级下册第1-4单元教材分析
- JTS-215-2018码头结构施工规范
- 大酒店风险分级管控和隐患排查治理双体系文件
评论
0/150
提交评论