资源描述:
《自然语言处理NLP》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、StatisticalNLP:Lecture8StatisticalInference:n-gramModelsoverSparseData1OverviewStatisticalInferenceconsistsoftakingsomedata(generatedinaccordancewithsomeunknownprobabilitydistribution)andthenmakingsomeinferencesaboutthisdistribution.Therearethreeissuestoconsider:Dividingthetrainingdataintoequivalen
2、ceclassesFindingagoodstatisticalestimatorforeachequivalenceclassCombiningmultipleestimators2FormingEquivalenceClassesIClassificationProblem:trytopredictthetargetfeaturebasedonvariousclassificatoryfeatures.==>ReliabilityversusdiscriminationMarkovAssumption:Onlythepriorlocalcontextaffectsthenextentry
3、:(n-1)thMarkovModelorn-gramSizeofthen-grammodelsversusnumberofparameters:wewouldlikentobelarge,butthenumberofparametersincreasesexponentiallywithn.Thereexistotherwaystoformequivalenceclassesofthehistory,buttheyrequiremorecomplicated.methods==>willusen-gramshere.3StatisticalEstimatorsI:OverviewGoal:
4、ToderiveagoodprobabilityestimateforthetargetfeaturebasedonobserveddataRunningExample:Fromn-gramdataP(w1,..,wn)’spredictP(wn
5、w1,..,wn-1)Solutionswewilllookat:MaximumLikelihoodEstimationLaplace’s,Lidstone’sandJeffreys-Perks’LawsHeldOutEstimationCross-ValidationGood-TuringEstimation4StatisticalEstimat
6、orsII:MaximumLikelihoodEstimationPMLE(w1,..,wn)=C(w1,..,wn)/N,whereC(w1,..,wn)isthefrequencyofn-gramw1,..,wnPMLE(wn
7、w1,..,wn-1)=C(w1,..,wn)/C(w1,..,wn-1)ThisestimateiscalledMaximumLikelihoodEstimate(MLE)becauseitisthechoiceofparametersthatgivesthehighestprobabilitytothetrainingcorpus.MLEisusuallyun
8、suitableforNLPbecauseofthesparsenessofthedata==>UseaDiscountingor.Smoothingtechnique.5StatisticalEstimatorsIII:SmoothingTechniques:LaplacePLAP(w1,..,wn)=(C(w1,..,wn)+1)/(N+B),whereC(w1,..,wn)isthefrequencyofn-gramw1,..,wnandBisthenumberofbinstraininginstancesaredividedinto.==>AddingOneProcessTheide
9、aistogivealittlebitoftheprobabilityspacetounseenevents.However,inNLPapplicationsthatareverysparse,Laplace’sLawactuallygivesfartoomuchoftheprobabilityspacetounseenevents.6StatisticalEstimatorsIV:SmoothingTec