第10章学习大纲•Introductiontomachinelearning•Supervisedlearning(监督学习)Decisiontreelearning(决策树学习)Linearpredictions(线性预测)Supportvectormachines(支持向量机)…•Unsupervisedlearning(无监督学习)Learning•学习对认识未知的环境是必不可少的,i.e.,当设计者缺乏完整知识的时候whendesignerlacksomniscience(全知)•学习作为一种系统构造方法是有用的,i.e.,编写一个学习智能体程序来实现比尝试着将函数直接写出来要好得多•学习会不断地修改智能体的决策机制来提高性能学习智能体学习元件Designofalearningelementisaffectedby性能元素的哪些组件是需要学习的什么样的反馈可被用来学习这些组件这些组件可以被哪些方法来表示IntroductiontoMachineLearningMachineLearningEveryday:SearchEngineMachineLearningEveryday:SpamDetection(垃圾邮件检测)MachineLearningEveryday:MachineTranslationMachineLearningEveryday:FaceDetection•NowinmostdigitalcamerasforautofocusingMachineLearning•脱胎于人工智能工作•电脑的一种新能力WhyMachineLearning?•Solveclassificationproblems•Learnmodelsofdata(“datafitting”)•Understandandimproveefficiencyofhumanlearning•Discovernewthingsorstructuresthatareunknowntohumans(“datamining”)…WhyMachineLearning?•LargeamountsofdataWebdata,Medicaldata,Biologicaldata…•昂贵的手工分析费用•计算机变得便宜并性能更加优良WhyMachineLearning?•应用程序无法直接通过手工编程完成无人驾驶手写识别自然语言处理(NLP)计算机视觉•理解人类的学习(人脑,真正的AI)Whatismachinelearningusefulfor?•机器学习在哪些领域有用?Automaticspeechrecognition自动语音识别•当前大部分语音识别和翻译都能够不断学习—你用得越多,它们就会变得越聪明Computervision:e.g.object,faceandhandwritingrecognitionInformationretrieval—信息检索对大量文本数据库的阅读,领会和分类对于人类来说是困难的WebPagesRetrieval(检索)Categorization(分类)Clustering(聚类)RelationsbetweenpagesFinancialpredictionMedicaldiagnosis(医学诊断)Bioinformatics(生物信息学)•e.g.基因微阵列数据建模,蛋白质结构预测Robotics机器人学电影推荐系统MovierecommendationsystemsMachineLearningMachinelearningisaninterdisciplinaryfieldfocusingonboththemathematicalfoundationsandpracticalapplicationsofsystemsthatlearn,reasonandact.机器学习是一个交叉学科的领域,着重于研究具有学习、推理和行动的系统所需要的数学基础以及实际应用Otherrelatedterms:PatternRecognition(模式识别),NeuralNetworks(神经网络),DataMining(数据挖掘),StatisticalModeling(统计模型)...Usingideasfrom:Statistics,ComputerScience,Engineering,AppliedMathematics,CognitiveScience(认知科学),Psychology(心理学),ComputationalNeuroscience(计算神经学),EconomicsThegoaloftheselectures:tointroduceimportantconcepts(概念),modelsandalgorithmsinmachinelearning.MachineLearning:定义•TomMitchell(1998)Well-posedLearningProblem:AcomputerprogramissaidtolearnfromexperienceEwithrespecttosometaskTandsomeperformancemeasureP,ifitsperformanceonT,asmeasuredbyP,improveswithexperienceE.•汤姆•米切尔(1998)很好地定义了学习问题:我们说一个计算机程序能从经验E中学会针对某些任务T和一些性能指标P的方法,如果程序使用E有效提高了在T中运行时的指标P.“AcomputerprogramissaidtolearnfromexperienceEwithrespecttosometaskTandsomeperformancemeasureP,ifitsperformanceonT,asmeasuredbyP,improveswithexperienceE.”假设你的邮件程序观测到你将一些邮件标记为垃圾邮件,以此为基础程序学习如何更好地过滤垃圾邮件,那么在该设定中taskT是什么?将邮件分类为垃圾或非垃圾邮件Watchingyoulabelemailsasspamornotspam.Thenumber(orfraction)ofemailscorrectlyclassifiedasspam/notspam.Noneoftheabove—thisisnotamachinelearningproblem.学习的种类想象一下,一个智能体或机器收集到一系列的传感输入(sensoryinputs):x1,x2,x3,x4,...Supervisedlearning(监督学习):Themachineisalsogivendesiredoutputsy1,y2,...,anditsgoalistolearntoproducethecorrectoutputgivenanewinput.Unsupervisedlearning(无监督学习):outputsy1,y2,...Notgiven,theagentstillwantstobuildamodelofxthatcanbeusedforreasoning,decisionmaking,predictingthings,communicatingetc.Semi-supervisedlearning(半监督学习)Representing“objects”inmachinelearning•举个实例,x,representsaspecificobject•x通常表示一个d维的特征向量x=(x1,...,xd)∈Rd•其中每一个维度叫做featureorattribute•特征值是连续的或离散的•x在d维的特征空间中是一个点•目标抽象化.忽略其他方面(e.g.,twopeoplehavingthesameweightandheightmaybeconsideredidentical)Featurevectorrepresentation特征向量表示法•文本文件词汇ofsized(~100,000)“bagofwords”:对每个词条的计数通常忽略掉stopwords:the,of,at,in,…特别的,用“out-of-vocabulary”(OOV)来捕捉所有未知的词特征向量表示法•图像像素,颜色直方图•银行账户信用等级,余额,最近一天、一星期、一个月、一年存款,#取款,…•Youandme医学特征test1,test2,test3,…主要成分•DataThedatasetDconsistsofNdatapoints:D={x1,x2...,xN}•Predictions(预测)Wearegenerallyinterestedinpredictingsomethingbasedontheobserveddataset.基于已观测到的数据集能否正确对后来的数据进行预测GivenDwhatcanwesayaboutxN+1?•ModelTomakepredictions,weneedtomakesomeassumptions.Wecanoftenexpresstheseassumptionsintheformofamodel,withsomeparameters(参数)为了完成预测任务,我们需要做一些合理假设。我们经常以带参数的模型形式来表达这些假设在给定数据集D时,我们学习模型的参数,以便对新数据进行预测.主要成分学习的架构数据预处理数据预处理特征提取特征提取轨迹识别分类器训练训练样本原始轨迹数据识别结果实验3:LearningProblemsHousingpriceprediction•SupervisedLearning监督学习数据中给出了“rightanswers”•Regression(回归):预测连续的输出值(price)乳腺癌(恶性,良性)•SupervisedLearning监督学习数据中给出了“rightanswers”•Classification(分类):预测离散值输出SupervisedLearningUnsupervisedLearningNext…•MachinelearningalgorithmsSupervisedlearningUnsupervisedlearning