MachineLearning-Lecture01

rawtools  时间:2021-03-18  阅读:()
Instructor(AndrewNg):Okay.
Goodmorning.
WelcometoCS229,themachinelearningclass.
SowhatIwannadotodayisjustspendalittletimegoingoverthelogisticsoftheclass,andthenwe'llstarttotalkabitaboutmachinelearning.
Bywayofintroduction,myname'sAndrewNgandI'llbeinstructorforthisclass.
AndsoIpersonallyworkinmachinelearning,andI'veworkedonitforabout15yearsnow,andIactuallythinkthatmachinelearningisthemostexcitingfieldofallthecomputersciences.
SoI'mactuallyalwaysexcitedaboutteachingthisclass.
SometimesIactuallythinkthatmachinelearningisnotonlythemostexcitingthingincomputerscience,butthemostexcitingthinginallofhumanendeavor,somaybealittlebiasthere.
IalsowanttointroducetheTAs,whoareallgraduatestudentsdoingresearchinorrelatedtothemachinelearningandallaspectsofmachinelearning.
PaulBaumstarckworksinmachinelearningandcomputervision.
CatieChangisactuallyaneuroscientistwhoappliesmachinelearningalgorithmstotrytounderstandthehumanbrain.
TomDoisanotherPhDstudent,worksincomputationalbiologyandinsortofthebasicfundamentalsofhumanlearning.
ZicoKolteristheheadTA—he'sheadTAtwoyearsinarownow—worksinmachinelearningandappliesthemtoabunchofrobots.
AndDanielRamageis—Iguesshe'snothere—Danielapplieslearningalgorithmstoproblemsinnaturallanguageprocessing.
Soyou'llgettoknowtheTAsandmemuchbetterthroughoutthisquarter,butjustfromthesortsofthingstheTA'sdo,IhopeyoucanalreadytellthatmachinelearningisahighlyinterdisciplinarytopicinwhichjusttheTAsfindlearningalgorithmstoproblemsincomputervisionandbiologyandrobotsandlanguage.
Andmachinelearningisoneofthosethingsthathasandishavingalargeimpactonmanyapplications.
Sojustinmyowndailywork,IactuallyfrequentlyenduptalkingtopeoplelikehelicopterpilotstobiologiststopeopleincomputersystemsordatabasestoeconomistsandsortofalsoanunendingstreamofpeoplefromindustrycomingtoStanfordinterestedinapplyingmachinelearningmethodstotheirownproblems.
Soyeah,thisisfun.
Acoupleofweeksago,astudentactuallyforwardedtomeanarticlein"ComputerWorld"aboutthe12ITskillsthatemployerscan'tsaynoto.
Soit'saboutsortofthe12mostdesirableskillsinallofITandallofinformationtechnology,andtoppingthelistwasactuallymachinelearning.
SoIthinkthisisagoodtimetobelearningthisstuffandlearningalgorithmsandhavingalargeimpactonmanysegmentsofscienceandindustry.
I'mactuallycuriousaboutsomething.
Learningalgorithmsisoneofthethingsthattouchesmanyareasofscienceandindustries,andI'mjustkindofcurious.
Howmanypeopleherearecomputersciencemajors,areinthecomputersciencedepartmentOkay.
Abouthalfofyou.
HowmanypeoplearefromEEOh,okay,maybeaboutafifth.
HowmanybiologersaretherehereWow,justafew,notmany.
I'msurprised.
AnyonefromstatisticsOkay,afew.
SowherearetherestofyoufromStudent:iCME.
Instructor(AndrewNg):SayagainStudent:iCME.
Instructor(AndrewNg):iCME.
Cool.
Student:[Inaudible].
Instructor(AndrewNg):CiviandwhatelseStudent:[Inaudible]Instructor(AndrewNg):Synthesis,[inaudible]systems.
Yeah,cool.
Student:Chemi.
Instructor(AndrewNg):Chemi.
Cool.
Student:[Inaudible].
Instructor(AndrewNg):Aero/astro.
Yes,right.
Yeah,okay,cool.
AnyoneelseStudent:[Inaudible].
Instructor(AndrewNg):PardonMSNE.
Allright.
Cool.
Yeah.
Student:[Inaudible].
Instructor(AndrewNg):PardonStudent:[Inaudible].
Instructor(AndrewNg):Endo—Student:[Inaudible].
Instructor(AndrewNg):Oh,Isee,industry.
Okay.
Cool.
Great,great.
Soasyoucantellfromacross-sectionofthisclass,Ithinkwe'reaverydiverseaudienceinthisroom,andthat'soneofthethingsthatmakesthisclassfuntoteachandfuntobein,Ithink.
Sointhisclass,we'vetriedtoconveytoyouabroadsetofprinciplesandtoolsthatwillbeusefulfordoingmany,manythings.
AndeverytimeIteachthisclass,IcanactuallyveryconfidentlysaythatafterDecember,nomatterwhatyou'regoingtodoafterthisDecemberwhenyou'vesortofcompletedthisclass,you'llfindthethingsyoulearninthisclassveryuseful,andthesethingswillbeusefulprettymuchnomatterwhatyouendupdoinglaterinyourlife.
SoIhavemorelogisticstogooverlater,butlet'ssayafewmorewordsaboutmachinelearning.
IfeelthatmachinelearninggrewoutofearlyworkinAI,earlyworkinartificialintelligence.
Andoverthelast—Iwannasaylast15orlast20yearsorso,it'sbeenviewedasasortofgrowingnewcapabilityforcomputers.
Andinparticular,itturnsoutthattherearemanyprogramsortherearemanyapplicationsthatyoucan'tprogrambyhand.
Forexample,ifyouwanttogetacomputertoreadhandwrittencharacters,toreadsortofhandwrittendigits,thatactuallyturnsouttobeamazinglydifficulttowriteapieceofsoftwaretotakethisinput,animageofsomethingthatIwroteandtofigureoutjustwhatitis,totranslatemycursivehandwritinginto—toextractthecharactersIwroteoutinlonghand.
Andotherthings:OnethingthatmystudentsandIdoisautonomousflight.
Itturnsouttobeextremelydifficulttositdownandwriteaprogramtoflyahelicopter.
Butincontrast,ifyouwanttodothingsliketogetsoftwaretoflyahelicopterorhavesoftwarerecognizehandwrittendigits,oneverysuccessfulapproachistousealearningalgorithmandhaveacomputerlearnbyitselfhowto,say,recognizeyourhandwriting.
Andinfact,handwrittendigitrecognition,thisisprettymuchtheonlyapproachthatworkswell.
Itusesapplicationsthatarehardtoprogrambyhand.
LearningalgorithmshasalsomadeIguesssignificantinroadsinwhat'ssometimescalleddatabasemining.
So,forexample,withthegrowthofITandcomputers,increasinglymanyhospitalsarekeepingaroundmedicalrecordsofwhatsortofpatients,whatproblemstheyhad,whattheirprognoseswas,whattheoutcomewas.
Andtakingallofthesemedicalrecords,whichstartedtobedigitizedonlyaboutmaybe15years,applyinglearningalgorithmstothemcanturnrawmedicalrecordsintowhatImightlooselycallmedicalknowledgeinwhichwestarttodetecttrendsinmedicalpracticeandevenstarttoaltermedicalpracticeasaresultofmedicalknowledgethat'sderivedbyapplyinglearningalgorithmstothesortsofmedicalrecordsthathospitalshavejustbeenbuildingoverthelast15,20yearsinanelectronicformat.
Turnsoutthatmostofyouprobablyuselearningalgorithms—Idon'tknow—Ithinkhalfadozentimesadayormaybeadozentimesadayormore,andoftenwithoutknowingit.
So,forexample,everytimeyousendmailviatheUSPostalSystem,turnsoutthere'sanalgorithmthattriestoautomaticallyreadthezipcodeyouwroteonyourenvelope,andthat'sdonebyalearningalgorithm.
SoeverytimeyousendUSmail,youareusingalearningalgorithm,perhapswithoutevenbeingawareofit.
Similarly,everytimeyouwriteacheck,Iactuallydon'tknowthenumberforthis,butasignificantfractionofchecksthatyouwriteareprocessedbyalearningalgorithmthat'slearnedtoreadthedigits,sothedollaramountthatyouwrotedownonyourcheck.
Soeverytimeyouwriteacheck,there'sanotherlearningalgorithmthatyou'reprobablyusingwithoutevenbeingawareofit.
Ifyouuseacreditcard,orIknowatleastonephonecompanywasdoingthis,andlotsofcompanieslikeeBayaswellthatdoelectronictransactions,there'sagoodchancethatthere'salearningalgorithminthebackgroundtryingtofigureoutif,say,yourcreditcard'sbeenstolenorifsomeone'sengaginginafraudulenttransaction.
IfyouuseawebsitelikeAmazonorNetflixthatwilloftenrecommendbooksforyoutobuyormoviesforyoutorentorwhatever,theseareotherexamplesoflearningalgorithmsthathavelearnedwhatsortsofthingsyouliketobuyorwhatsortsofmoviesyouliketowatchandcanthereforegivecustomizedrecommendationstoyou.
Justaboutaweekago,Ihadmycarserviced,andeventhere,mycarmechanicwastryingtoexplaintomesomelearningalgorithmintheinnardsofmycarthat'ssortofdoingitsbesttooptimizemydrivingperformanceforfuelefficiencyorsomething.
So,see,mostofususelearningalgorithmshalfadozen,adozen,maybedozensoftimeswithoutevenknowingit.
Andofcourse,learningalgorithmsarealsodoingthingslikegivingusagrowingunderstandingofthehumangenome.
Soifsomedayweeverfindacureforcancer,Ibetlearningalgorithmswillhavehadalargeroleinthat.
That'ssortofthethingthatTomworkson,yesSointeachingthisclass,Isortofhavethreegoals.
OneofthemisjusttoIhopeconveysomeofmyownexcitementaboutmachinelearningtoyou.
Thesecondgoalisbytheendofthisclass,Ihopeallofyouwillbeabletoapplystate-of-the-artmachinelearningalgorithmstowhateverproblemsyou'reinterestedin.
Andifyoueverneedtobuildasystemforreadingzipcodes,you'llknowhowtodothatbytheendofthisclass.
Andlastly,bytheendofthisclass,Irealizethatonlyasubsetofyouareinterestedindoingresearchinmachinelearning,butbytheconclusionofthisclass,Ihopethatallofyouwillactuallybewellqualifiedtostartdoingresearchinmachinelearning,okaySolet'ssayafewwordsaboutlogistics.
Theprerequisitesofthisclassarewrittenononeofthehandouts,areasfollows:Inthisclass,I'mgoingtoassumethatallofyouhavesortofbasicknowledgeofcomputerscienceandknowledgeofthebasiccomputerskillsandprinciples.
SoIassumeallofyouknowwhatbigOnotation,thatallofyouknowaboutsortofdatastructureslikequeues,stacks,binarytrees,andthatallofyouknowenoughprogrammingskillsto,like,writeasimplecomputerprogram.
Anditturnsoutthatmostofthisclasswillnotbeveryprogrammingintensive,althoughwewilldosomeprogramming,mostlyineitherMATLABorOctave.
I'llsayabitmoreaboutthatlater.
Ialsoassumefamiliaritywithbasicprobabilityandstatistics.
Somostundergraduatestatisticsclass,likeStat116taughthereatStanford,willbemorethanenough.
I'mgonnaassumeallofyouknowwhatrandomvariablesare,thatallofyouknowwhatexpectationis,whatavarianceorarandomvariableis.
Andincaseofsomeofyou,it'sbeenawhilesinceyou'veseensomeofthismaterial.
Atsomeofthediscussionsections,we'llactuallygooversomeoftheprerequisites,sortofasarefreshercourseunderprerequisiteclass.
I'llsayabitmoreaboutthatlateraswell.
Lastly,Ialsoassumefamiliaritywithbasiclinearalgebra.
Andagain,mostundergraduatelinearalgebracoursesaremorethanenough.
Soifyou'vetakencourseslikeMath51,103,Math113orCS205atStanford,thatwouldbemorethanenough.
Basically,I'mgonnaassumethatallofyouknowwhatmatrixesandvectorsare,thatyouknowhowtomultiplymatricesandvectorsandmultiplymatrixandmatrices,thatyouknowwhatamatrixinverseis.
Ifyouknowwhataneigenvectorofamatrixis,that'dbeevenbetter.
Butifyoudon'tquiteknoworifyou'renotquitesure,that'sfine,too.
We'llgooveritinthereviewsections.
SothereareacouplemorelogisticalthingsIshoulddealwithinthisclass.
Oneisthat,asmostofyouknow,CS229isatelevisedclass.
Andinfact,IguessmanyofyouareprobablywatchingthisathomeonTV,soI'mgonnasayhitoourhomeviewers.
Soearlierthisyear,IapproachedSCPD,whichtelevisestheseclasses,abouttryingtomakeasmallnumberofStanfordclassespubliclyavailableorpostingthevideosontheweb.
Andsothisyear,Stanfordisactuallystartingasmallpilotprograminwhichwe'llpostvideosofasmallnumberofclassesonline,soontheInternetinawaythatmakesitpubliclyaccessibletoeveryone.
I'mveryexcitedaboutthatbecausemachinelearninginschool,let'sgetthewordoutthere.
Oneoftheconsequencesofthisisthat—let'ssee—sovideosorpicturesofthestudentsinthisclassroomwillnotbepostedonline,soyourimages—sodon'tworryaboutbeingbyseeingyourownfaceappearonYouTubeoneday.
Butthemicrophonesmaypickupyourvoices,soIguesstheconsequenceofthatisthatbecausemicrophonesmaypickupyourvoices,nomatterhowirritatedyouareatme,don'tyelloutswearwordsinthemiddleofclass,butbecausetherewon'tbevideoyoucansafelysitthereandmakefacesatme,andthatwon'tshow,okayLet'ssee.
Ialsohandedoutthis—thereweretwohandoutsIhopemostofyouhave,courseinformationhandout.
Soletmejustsayafewwordsaboutpartsofthese.
Onthethirdpage,there'sasectionthatsaysOnlineResources.
Oh,okay.
LouderActually,couldyouturnupthevolumeTesting.
IsthisbetterTesting,testing.
Okay,cool.
Thanks.
Soallright,onlineresources.
Theclasshasahomepage,soit'sinonthehandouts.
Iwon'twriteonthechalkboard—http://cs229.
stanford.
edu.
Andsowhentherearehomeworkassignmentsorthingslikethat,weusuallywon'tsortof—inthemissionofsavingtrees,wewillusuallynotgiveoutmanyhandoutsinclass.
Sohomeworkassignments,homeworksolutionswillbepostedonlineatthecoursehomepage.
Asfarasthisclass,I'vealsowritten,andIguessI'vealsorevisedeveryyearasetoffairlydetailedlecturenotesthatcoverthetechnicalcontentofthisclass.
Andsoifyouvisitthecoursehomepage,you'llalsofindthedetailedlecturenotesthatgooverindetailallthemathandequationsandsoonthatI'llbedoinginclass.
There'salsoanewsgroup,su.
class.
cs229,alsowrittenonthehandout.
Thisisanewsgroupthat'ssortofaforumforpeopleintheclasstogettoknoweachotherandhavewhateverdiscussionsyouwanttohaveamongstyourselves.
SotheclassnewsgroupwillnotbemonitoredbytheTAsandme.
Butthisisaplaceforyoutoformstudygroupsorfindprojectpartnersordiscusshomeworkproblemsandsoon,andit'snotmonitoredbytheTAsandme.
Sofeelfreetotalktrashaboutthisclassthere.
Ifyouwanttocontacttheteachingstaff,pleaseusetheemailaddresswrittendownhere,cs229-qa@cs.
stanford.
edu.
Thisgoestoanaccountthat'sreadbyalltheTAsandme.
Soratherthansendingusemailindividually,ifyousendemailtothisaccount,itwillactuallyletusgetbacktoyoumaximallyquicklywithanswerstoyourquestions.
Ifyou'reaskingquestionsabouthomeworkproblems,pleasesayinthesubjectlinewhichassignmentandwhichquestiontheemailrefersto,sincethatwillalsohelpustorouteyourquestiontotheappropriateTAortomeappropriatelyandgettheresponsebacktoyouquickly.
Let'ssee.
Skippingahead—let'ssee—forhomework,onemidterm,oneopenandtermproject.
Noticeonthehonorcode.
SoonethingthatIthinkwillhelpyoutosucceedanddowellinthisclassandevenhelpyoutoenjoythisclassmoreisifyouformastudygroup.
Sostartlookingaroundwhereyou'resittingnoworattheendofclasstoday,minglealittlebitandgettoknowyourclassmates.
Istronglyencourageyoutoformstudygroupsandsortofhaveagroupofpeopletostudywithandhaveagroupofyourfellowstudentstotalkovertheseconceptswith.
Youcanalsopostontheclassnewsgroupifyouwanttousethattotrytoformastudygroup.
Butsomeoftheproblemssetsinthisclassarereasonablydifficult.
Peoplethathavetakentheclassbeforemaytellyoutheywereverydifficult.
AndjustIbetitwouldbemorefunforyou,andyou'dprobablyhaveabetterlearningexperienceifyouformastudygroupofpeopletoworkwith.
SoIdefinitelyencourageyoutodothat.
Andjusttosayawordonthehonorcode,whichisIdefinitelyencourageyoutoformastudygroupandworktogether,discusshomeworkproblemstogether.
Butifyoudiscusshomeworkproblemswithotherstudents,thenI'llaskyoutosortofgohomeandwritedownyourownsolutionsindependentlywithoutreferringtonotesthatweretakeninanyofyourjointstudysessions.
Soinotherwords,whenyouturninahomeworkproblem,whatyouturninshouldbesomethingthatwasreconstructedindependentlybyyourselfandwithoutreferringtonotesthatyoutookduringyourstudysessionswithotherpeople,okayAndobviously,showingyoursolutionstoothersorcopyingothersolutionsdirectlyisrightout.
Weoccasionallyalsoreuseproblemsetquestionsfrompreviousyearssothattheproblemsareabitmoredebuggedandworkmoresmoothly.
Andasaresultofthat,Ialsoaskyounottolookatsolutionsfrompreviousyears,andthisincludesbothsortofofficialsolutionsthatwe'vegivenouttopreviousgenerationsofthisclassandprevioussolutionsthatpeoplethathavetakenthisclassinpreviousyearsmayhavewrittenoutbythemselves,okaySadly,inthisclass,thereareusually—sadly,inpreviousyears,therehaveoftenbeenafewhonorcodeviolationsinthisclass.
Andlastyear,IthinkIprosecutedfivehonorcodeviolations,whichIthinkisaridiculouslylargenumber.
Andsojustdon'tworkwithoutsolutions,andhopefullythere'llbezerohonorcodeviolationsthisyear.
I'dloveforthattohappen.
Thesectionhereonthelatehomeworkpolicyifyoueverwanttohandinahomeworklate,I'llleaveyoutoreadthatyourself.
Wealsohaveamidterm,whichisscheduledforThursday,8thofNovemberat6:00p.
m.
,sopleasekeepthateveningfree.
Andlet'ssee.
AndonemoreadministrativethingIwantedtosayisabouttheclassproject.
Sopartofthegoalofthisclassistoleaveyouwellequippedtoapplymachinelearningalgorithmstoaproblemortodoresearchinmachinelearning.
Andsoaspartofthisclass,I'llaskyoutoexecuteasmallresearchprojectsortofasasmalltermproject.
Andwhatmoststudentsdoforthisiseitherapplymachinelearningtoaproblemthatyoufindinterestingorinvestigatesomeaspectofmachinelearning.
Sotothoseofyouthatareeitheralreadydoingresearchortothoseofyouwhoareinindustry,you'retakingthisfromacompany,onefantasticsortofwaytodoaclassprojectwouldbeifyouapplymachinelearningalgorithmstoaproblemthatyou'reinterestedin,toaproblemthatyou'realreadyworkingon,whetheritbeascienceresearchproblemorsortofaprobleminindustrywhereyou'retryingtogetasystemtoworkusingalearningalgorithm.
Tothoseofyouthatarenotcurrentlydoingresearch,onegreatwaytodoaprojectwouldbeifyouapplylearningalgorithmstojustpickaproblemthatyoucareabout.
Pickaproblemthatyoufindinteresting,andapplylearningalgorithmstothatandplaywiththeideasandseewhathappens.
Andlet'ssee.
Oh,andthegoaloftheprojectshouldreallybeforyoutodoapublishablepieceofresearchinmachinelearning,okayAndifyougotothecoursewebsite,you'llactuallyfindalistoftheprojectsthatstudentshaddonelastyear.
AndsoI'mholdingthelistinmyhand.
Youcangohomelaterandtakealookatitonline.
Butreadingdownthislist,Iseethatlastyear,therewerestudentsthatappliedlearningalgorithmstocontrolasnakerobot.
Therewasafewprojectsonimprovinglearningalgorithms.
There'saprojectonflyingautonomousaircraft.
TherewasaprojectactuallydonebyourTAPaulonimprovingcomputervisionalgorithmsusingmachinelearning.
ThereareacoupleofprojectsonNetflixrankingsusinglearningalgorithms;afewmedicalrobots;onesonsegmenting[inaudible]tosegmentingpiecesofthebodyusinglearningalgorithms;oneonmusicalinstrumentdetection;anotheronironysequencealignment;andafewalgorithmsonunderstandingthebrainneuroscience,actuallyquiteafewprojectsonneuroscience;acoupleofprojectsonundescendingfMRIdataonbrainscans,andsoon;anotherprojectonmarketmakings,thefinancialtrading.
Therewasaninterestingprojectontryingtouselearningalgorithmstodecidewhatisitthatmakesaperson'sfacephysicallyattractive.
There'salearningalgorithmonopticalillusions,andsoon.
Anditgoeson,solotsoffunprojects.
Andtakealook,thencomeupwithyourownideas.
Butwhateveryoufindcoolandinteresting,Ihopeyou'llbeabletomakemachinelearningaprojectoutofit.
Yeah,questionStudent:ArethesegroupprojectsInstructor(AndrewNg):Oh,yes,thankyou.
Student:SohowmanypeoplecanbeinagroupInstructor(AndrewNg):Right.
Soprojectscanbedoneingroupsofuptothreepeople.
Soaspartofformingstudygroups,latertodayasyougettoknowyourclassmates,Idefinitelyalsoencourageyoutograbtwootherpeopleandformagroupofuptothreepeopleforyourproject,okayAndjuststartbrainstormingideasfornowamongstyourselves.
YoucanalsocomeandtalktomeortheTAsifyouwanttobrainstormideaswithus.
Okay.
Soonemoreorganizationalquestion.
I'mcurious,howmanyofyouknowMATLABWow,cool,quitealot.
Okay.
Soaspartofthe—actuallyhowmanyofyouknowOctaveorhaveusedOctaveOh,okay,muchsmallernumber.
Soaspartofthisclass,especiallyinthehomeworks,we'llaskyoutoimplementafewprograms,afewmachinelearningalgorithmsaspartofthehomeworks.
AndmostofthosehomeworkswillbedoneineitherMATLABorinOctave,whichissortof—IknowsomepeoplecallitafreeversionofMATLAB,whichitsortofis,sortofisn't.
SoIguessforthoseofyouthathaven'tseenMATLABbefore,andIknowmostofyouhave,MATLABisIguesspartoftheprogramminglanguagethatmakesitveryeasytowritecodesusingmatrices,towritecodefornumericalroutines,tomovedataaround,toplotdata.
Andit'ssortofanextremelyeasytolearntooltouseforimplementingalotoflearningalgorithms.
Andincasesomeofyouwanttoworkonyourownhomecomputerorsomethingifyoudon'thaveaMATLABlicense,forthepurposesofthisclass,there'salso—[inaudible]writethatdown[inaudible]MATLAB—there'salsoasoftwarepackagecalledOctavethatyoucandownloadforfreeofftheInternet.
AndithassomewhatfewerfeaturesthanMATLAB,butit'sfree,andforthepurposesofthisclass,itwillworkforjustabouteverything.
SoactuallyI,well,soyeah,justasidecommentforthoseofyouthathaven'tseenMATLABbeforeIguess,onceacolleagueofmineatadifferentuniversity,notatStanford,actuallyteachesanothermachinelearningcourse.
He'staughtitformanyyears.
Sooneday,hewasinhisoffice,andanoldstudentofhisfrom,like,tenyearsagocameintohisofficeandhesaid,"Oh,professor,professor,thankyousomuchforyourmachinelearningclass.
Ilearnedsomuchfromit.
There'sthisstuffthatIlearnedinyourclass,andInowuseeveryday.
Andit'shelpedmemakelotsofmoney,andhere'sapictureofmybighouse.
"Somyfriendwasveryexcited.
Hesaid,"Wow.
That'sgreat.
I'mgladtohearthismachinelearningstuffwasactuallyuseful.
SowhatwasitthatyoulearnedWasitlogisticregressionWasitthePCAWasitthedatanetworksWhatwasitthatyoulearnedthatwassohelpful"Andthestudentsaid,"Oh,itwastheMATLAB.
"Soforthoseofyouthatdon'tknowMATLAByet,Ihopeyoudolearnit.
It'snothard,andwe'llactuallyhaveashortMATLABtutorialinoneofthediscussionsectionsforthoseofyouthatdon'tknowit.
Okay.
Theverylastpieceoflogisticalthingisthediscussionsections.
SodiscussionsectionswillbetaughtbytheTAs,andattendanceatdiscussionsectionsisoptional,althoughthey'llalsoberecordedandtelevised.
Andwe'llusethediscussionsectionsmainlyfortwothings.
Forthenexttwoorthreeweeks,we'llusethediscussionsectionstogoovertheprerequisitestothisclassorifsomeofyouhaven'tseenprobabilityorstatisticsforawhileormaybealgebra,we'llgooverthoseinthediscussionsectionsasarefresherforthoseofyouthatwantone.
Laterinthisquarter,we'llalsousethediscussionsectionstogooverextensionsforthematerialthatI'mteachinginthemainlectures.
Somachinelearningisahugefield,andthereareafewextensionsthatwereallywanttoteachbutdidn'thavetimeinthemainlecturesfor.
Solaterthisquarter,we'llusethediscussionsectionstotalkaboutthingslikeconvexoptimization,totalkalittlebitabouthiddenMarkovmodels,whichisatypeofmachinelearningalgorithmformodelingtimeseriesandafewotherthings,soextensionstothematerialsthatI'llbecoveringinthemainlectures.
Andattendanceatthediscussionsectionsisoptional,okaySothatwasallIhadfromlogistics.
Beforewemoveontostarttalkingabitaboutmachinelearning,letmecheckwhatquestionsyouhave.
YeahStudent:[Inaudible]RorsomethinglikethatInstructor(AndrewNg):Oh,yeah,let'ssee,right.
Soourpolicyhasbeenthatyou'rewelcometouseR,butIwouldstronglyadviseagainstit,mainlybecauseinthelastproblemset,weactuallysupplysomecodethatwillruninOctavebutthatwouldbesomewhatpainfulforyoutotranslateintoRyourself.
Soforyourotherassignments,ifyouwannasubmitasolutioninR,that'sfine.
ButIthinkMATLABisactuallytotallyworthlearning.
IknowRandMATLAB,andIpersonallyendupusingMATLABquiteabitmoreoftenforvariousreasons.
YeahStudent:Forthe[inaudible]project[inaudible]Instructor(AndrewNg):Soforthetermproject,you'rewelcometodoitinsmallergroupsofthree,oryou'rewelcometodoitbyyourselforingroupsoftwo.
Gradingisthesameregardlessofthegroupsize,sowithalargergroup,youprobably—Irecommendtryingtoformateam,butit'sactuallytotallyfinetodoitinasmallergroupifyouwant.
Student:[Inaudible]whatlanguage[inaudible]Instructor(AndrewNg):Solet'ssee.
ThereisnoCprogramminginthisclassotherthananythatyoumaychoosetodoyourselfinyourproject.
SoallthehomeworkscanbedoneinMATLABorOctave,andlet'ssee.
AndIguesstheprogramprerequisitesismoretheabilitytounderstandbigOnotationandknowledgeofwhatadatastructure,likealinkedlistoraqueueorbinarytreatments,moresothanyourknowledgeofCorJavaspecifically.
YeahStudent:Lookingattheendsemesterproject,Imean,whatexactlywillyoubetestingoverthere[Inaudible]Instructor(AndrewNg):OftheprojectStudent:Yeah.
Instructor(AndrewNg):Yeah,letmeanswerthatlater.
Inacoupleofweeks,Ishallgiveoutahandoutwithguidelinesfortheproject.
Butfornow,weshouldthinkofthegoalasbeingtodoacoolpieceofmachinelearningworkthatwillletyouexperiencethejoysofmachinelearningfirsthandandreallytrytothinkaboutdoingapublishablepieceofwork.
Somanystudentswilltrytobuildacoolmachinelearningapplication.
That'sprobablythemostcommonproject.
Somestudentswilltrytoimprovestate-of-the-artmachinelearning.
Someofthoseprojectsarealsoverysuccessful.
It'salittlebithardertodo.
Andthere'salsoasmallerminorityofstudentsthatwillsometimestrytoprove—developthetheoryofmachinelearningfurtherortrytoprovetheoremsaboutmachinelearning.
Sothey'reusuallygreatprojectsofallofthosetypeswithapplicationsandmachinelearningbeingthemostcommon.
AnythingelseOkay,cool.
Sothatwasitforlogistics.
Let'stalkaboutlearningalgorithms.
SocanIhavethelaptopdisplay,please,ortheprojectorActually,couldyoulowerthebigscreenCool.
Thisisamazingcustomerservice.
Thankyou.
Isee.
Okay,cool.
Okay.
No,that'sfine.
Isee.
Okay.
That'scool.
Thanks.
Okay.
Bigscreenisn'tworkingtoday,butIhopeyoucanreadthingsonthesmallerscreensoutthere.
Actually,[inaudible]Ithinkthisroomjustgotanewprojectorthat—someonesentyouanexcitedemail—wasitjustonFriday—sayingwejustgotanewprojectorandtheysaid4,000-to-1somethingorotherbrightnessratio.
Idon'tknow.
Someonewasveryexcitedaboutthenewprojectorinthisroom,butIguesswe'llseethatinoperationonWednesday.
Sostartbytalkingaboutwhatmachinelearningis.
WhatismachinelearningActually,canyoureadthetextoutthereRaiseyourhandifthetextonthesmallscreensislegible.
Oh,okay,cool,mostlylegible.
Okay.
SoI'lljustreaditout.
SowhatismachinelearningWaybackinabout1959,ArthurSamueldefinedmachinelearninginformallyasthe[inaudible]thatgivescomputerstolearn—[inaudible]thatgivescomputerstheabilitytolearnwithoutbeingexplicitlyprogrammed.
SoArthurSamuel,sowaybackinthehistoryofmachinelearning,actuallydidsomethingverycool,whichwashewroteacheckersprogram,whichwouldplaygamesofcheckersagainstitself.
Andsobecauseacomputercanplaythousandsofgamesagainstitselfrelativelyquickly,ArthurSamuelhadhisprogramplaythousandsofgamesagainstitself,andovertimeitwouldstarttolearntorecognizepatternswhichledtowinsandpatternswhichledtolosses.
Soovertimeitlearnedthingslikethat,"Gee,ifIgetalotofpiecestakenbytheopponent,thenI'mmorelikelytolosethanwin,"or,"Gee,ifIgetmypiecesintoacertainposition,thenI'mespeciallylikelytowinratherthanlose.
"Andsoovertime,ArthurSamuelhadacheckersprogramthatwouldactuallylearntoplaycheckersbylearningwhatarethesortofboardpositionsthattendtobeassociatedwithwinsandwhataretheboardpositionsthattendtobeassociatedwithlosses.
Andwaybackaround1959,theamazingthingaboutthiswasthathisprogramactuallylearnedtoplaycheckersmuchbetterthanArthurSamuelhimselfcould.
Soeventoday,therearesomepeoplethatsay,well,computerscan'tdoanythingthatthey'renotexplicitlyprogrammedto.
AndArthurSamuel'scheckersprogramwasmaybethefirstIthinkreallyconvincingrefutationofthisclaim.
Namely,ArthurSamuelmanagedtowriteacheckersprogramthatcouldplaycheckersmuchbetterthanhepersonallycould,andthisisaninstanceofmaybecomputerslearningtodothingsthattheywerenotprogrammedexplicitlytodo.
Here'samorerecent,amoremodern,moreformaldefinitionofmachinelearningduetoTomMitchell,whosaysthatawell-posedlearningproblemisdefinedasfollows:HesaysthatacomputerprogramissettolearnfromanexperienceEwithrespecttosometaskTandsomeperformancemeasurePifitsperformanceonTasmeasuredbyPimproveswithexperienceE.
Okay.
Sonotonlyisitadefinition,itevenrhymes.
So,forexample,inthecaseofcheckers,theexperienceEthataprogramhaswouldbetheexperienceofplayinglotsofgamesofcheckersagainstitself,say.
ThetaskTisthetaskofplayingcheckers,andtheperformancemeasurePwillbesomethinglikethefractionofgamesitwinsagainstacertainsetofhumanopponents.
Andbythisdefinition,we'llsaythatArthurSamuel'scheckersprogramhaslearnedtoplaycheckers,okaySoasanoverviewofwhatwe'regoingtodointhisclass,thisclassissortoforganizedintofourmajorsections.
We'regonnatalkaboutfourmajortopicsinthisclass,thefirstofwhichissupervisedlearning.
Soletmegiveyouanexampleofthat.
Sosupposeyoucollectadatasetofhousingprices.
AndoneoftheTAs,DanRamage,actuallycollectedadatasetformelastweektouseintheexamplelater.
Butsupposethatyougotocollectstatisticsabouthowmuchhousescostinacertaingeographicarea.
AndDan,theTA,collecteddatafromhousingpricesinPortland,Oregon.
Sowhatyoucandoislet'ssayplotthesquarefootageofthehouseagainstthelistpriceofthehouse,right,soyoucollectdataonabunchofhouses.
Andlet'ssayyougetadatasetlikethiswithhousesofdifferentsizesthatarelistedfordifferentamountsofmoney.
Now,let'ssaythatI'mtryingtosellahouseinthesameareaasPortland,Oregonaswherethedatacomesfrom.
Let'ssayIhaveahousethat'sthissizeinsquarefootage,andIwantanalgorithmtotellmeabouthowmuchshouldIexpectmyhousetosellfor.
Sotherearelotsofwaystodothis,andsomeofyoumayhaveseenelementsofwhatI'mabouttosaybefore.
Soonethingyoucoulddoislookatthisdataandmaybeputastraightlinetoit.
Andthenifthisismyhouse,youmaythenlookatthestraightlineandpredictthatmyhouseisgonnagoforaboutthatmuchmoney,rightThereareotherdecisionsthatwecanmake,whichwe'lltalkaboutlater,whichis,well,whatifIdon'twannaputastraightlineMaybeIshouldputaquadraticfunctiontoit.
Maybethatfitsthedataalittlebitbetter.
Younoticeifyoudothat,thepriceofmyhousegoesupabit,sothat'dbenice.
Andthissortoflearningproblemoflearningtopredicthousingpricesisanexampleofwhat'scalledasupervisedlearningproblem.
Andthereasonthatit'scalledsupervisedlearningisbecausewe'reprovidingthealgorithmadatasetofabunchofsquarefootages,abunchofhousingsizes,andaswellassortoftherightanswerofwhattheactualpricesofanumberofhouseswere,rightSowecallthissupervisedlearningbecausewe'resupervisingthealgorithmor,inotherwords,we'regivingthealgorithmthe,quote,rightanswerforanumberofhouses.
Andthenwewantthealgorithmtolearntheassociationbetweentheinputsandtheoutputsandtosortofgiveusmoreoftherightanswers,okayItturnsoutthisspecificexamplethatIdrewhereisanexampleofsomethingcalledaregressionproblem.
Andthetermregressionsortofreferstothefactthatthevariableyou'retryingtopredictisacontinuousvalueandprice.
There'sanotherclassofsupervisedlearningproblemswhichwe'lltalkabout,whichareclassificationproblems.
Andso,inaclassificationproblem,thevariableyou'retryingtopredictisdiscreetratherthancontinuous.
Soasonespecificexample—soactuallyastandarddatasetyoucandownloadonline[inaudible]thatlotsofmachinelearningpeoplehaveplayedwith.
Let'ssayyoucollectadatasetonbreastcancertumors,andyouwanttolearnthealgorithmtopredictwhetherornotacertaintumorismalignant.
Malignantistheoppositeofbenign,right,somalignancyisasortofharmful,badtumor.
Sowecollectsomenumberoffeatures,somenumberofpropertiesofthesetumors,andforthesakeofsortofhavingasimple[inaudible]explanation,let'sjustsaythatwe'regoingtolookatthesizeofthetumoranddependingonthesizeofthetumor,we'lltrytofigureoutwhetherornotthetumorismalignantorbenign.
Sothetumoriseithermalignantorbenign,andsothevariableintheYaxisiseitherzeroor1,andsoyourdatasetmaylooksomethinglikethat,rightAndthat's1andthat'szero,okayAndsothisisanexampleofaclassificationproblemwherethevariableyou'retryingtopredictisadiscreetvalue.
It'seitherzeroor1.
Andinfact,moregenerally,therewillbemanylearningproblemswherewe'llhavemorethanoneinputvariable,morethanoneinputfeatureandusemorethanonevariabletotrytopredict,say,whetheratumorismalignantorbenign.
So,forexample,continuingwiththis,youmayinsteadhaveadatasetthatlookslikethis.
I'mgonnapartthisdatasetinaslightlydifferentwaynow.
AndI'mmakingthisdatasetlookmuchcleanerthanitreallyisinrealityforillustration,okayForexample,maybethecrossesindicatemalignanttumorsandthe"O"smayindicatebenigntumors.
Andsoyoumayhaveadatasetcomprisingpatientsofdifferentagesandwhohavedifferenttumorsizesandwhereacrossindicatesamalignanttumor,andan"O"indicatesabenigntumor.
Andyoumaywantanalgorithmtolearntopredict,givenanewpatient,whethertheirtumorismalignantorbenign.
So,forexample,whatalearningalgorithmmaydoismaybecomeinanddecidethatastraightlinelikethatseparatesthetwoclassesoftumorsreallywell,andsoifyouhaveanewpatientwho'sageandtumorsizefalloverthere,thenthealgorithmmaypredictthatthetumorisbenignratherthanmalignant,okaySothisisjustanotherexampleofanothersupervisedlearningproblemandanotherclassificationproblem.
Andsoitturnsoutthatoneoftheissueswe'lltalkaboutlaterinthisclassisinthisspecificexample,we'regoingtotrytopredictwhetheratumorismalignantorbenignbasedontwofeaturesorbasedontwoinputs,namelytheageofthepatientandthetumorsize.
Itturnsoutthatwhenyoulookatarealdataset,youfindthatlearningalgorithmsoftenuseothersetsoffeatures.
Inthebreastcancerdataexample,youalsousepropertiesofthetumors,likeclumpthickness,uniformityofcellsize,uniformityofcellshape,[inaudible]adhesionandsoon,sovariousothermedicalproperties.
Andoneofthemostinterestingthingswe'lltalkaboutlaterthisquarteriswhatifyourdatadoesn'tlieinatwo-dimensionalorthree-dimensionalorsortofevenafinitedimensionalspace,butisitpossible—whatifyourdataactuallyliesinaninfinitedimensionalspaceOurplotsherearetwo-dimensionalspace.
Ican'tplotyouaninfinitedimensionalspace,rightAndsoitturnsoutthatoneofthemostsuccessfulclassesofmachinelearningalgorithms—somemaycallsupportvectormachines—actuallytakesdataandmapsdatatoaninfinitedimensionalspaceandthendoesclassificationusingnottwofeatureslikeI'vedonehere,butaninfinitenumberoffeatures.
Andthatwillactuallybeoneofthemostfascinatingthingswetalkaboutwhenwegodeeplyintoclassificationalgorithms.
Andit'sactuallyaninterestingquestion,right,sothinkabouthowdoyouevenrepresentaninfinitedimensionalvectorincomputermemoryYoudon'thaveaninfiniteamountofcomputers.
HowdoyouevenrepresentapointthatliesinaninfinitedimensionalspaceWe'lltalkaboutthatwhenwegettosupportvectormachines,okaySolet'ssee.
Sothatwassupervisedlearning.
Thesecondofthefourmajortopicsofthisclasswillbelearningtheory.
SoIhaveafriendwhoteachesmathatadifferentuniversity,notatStanford,andwhenyoutalktohimabouthisworkandwhathe'sreallyouttodo,thisfriendofminewill—he'samathprofessor,right—thisfriendofminewillsortofgetthelookofwonderinhiseyes,andhe'lltellyouabouthowinhismathematicalwork,hefeelslikehe'sdiscoveringtruthandbeautyintheuniverse.
Andhesaysitinsortofareallytouching,sincereway,andthenhehasthis—youcanseeitinhiseyes—hehasthisdeepappreciationofthetruthandbeautyintheuniverseasrevealedtohimbythemathhedoes.
Inthisclass,I'mnotgonnadoanytruthandbeauty.
Inthisclass,I'mgonnatalkaboutlearningtheorytotrytoconveytoyouanunderstandingofhowandwhylearningalgorithmsworksothatwecanapplytheselearningalgorithmsaseffectivelyaspossible.
So,forexample,itturnsoutyoucanprovesurprisinglydeeptheoremsonwhenyoucanguaranteethatalearningalgorithmwillwork,allrightSothinkaboutalearningalgorithmforreadingzipcodes.
Whencanyouproveatheoremguaranteeingthatalearningalgorithmwillbeatleast99.
9percentaccurateonreadingzipcodesThisisactuallysomewhatsurprising.
Weactuallyprovetheoremsshowingwhenyoucanexpectthattohold.
We'llalsosortofdelveintolearningtheorytotrytounderstandwhatalgorithmscanapproximatedifferentfunctionswellandalsotrytounderstandthingslikehowmuchtrainingdatadoyouneedSohowmanyexamplesofhousesdoIneedinorderforyourlearningalgorithmtorecognizethepatternbetweenthesquarefootageofahouseanditshousingpriceAndthiswillhelpusanswerquestionslikeifyou'retryingtodesignalearningalgorithm,shouldyoubespendingmoretimecollectingmoredataorisitacasethatyoualreadyhaveenoughdata;itwouldbeawasteoftimetotrytocollectmore.
OkaySoIthinklearningalgorithmsareaverypowerfultoolthatasIwalkaroundsortofindustryinSiliconValleyorasIworkwithvariousbusinessesinCSandoutsideCS,Ifindthatthere'softenahugedifferencebetweenhowwellsomeonewhoreallyunderstandsthisstuffcanapplyalearningalgorithmversussomeonewhosortofgetsitbutsortofdoesn't.
TheanalogyIliketothinkofisimagineyouweregoingtoacarpentryschoolinsteadofamachinelearningclass,rightIfyougotoacarpentryschool,theycangiveyouthetoolsofcarpentry.
They'llgiveyouahammer,abunchofnails,ascrewdriverorwhatever.
Butamastercarpenterwillbeabletousethosetoolsfarbetterthanmostofusinthisroom.
IknowacarpentercandothingswithahammerandnailthatIcouldn'tpossibly.
Andit'sactuallyalittlebitlikethatinmachinelearning,too.
Onethingthat'ssadlynottaughtinmanycoursesonmachinelearningishowtotakethetoolsofmachinelearningandreally,reallyapplythemwell.
Sointhesameway,sothetoolsofmachinelearningareIwannasayquiteabitmoreadvancedthanthetoolsofcarpentry.
Maybeacarpenterwilldisagree.
Butalargepartofthisclasswillbejustgivingyoutherawtoolsofmachinelearning,justthealgorithmsandsoon.
ButwhatIplantodothroughoutthisentirequarter,notjustinthesegmentoflearningtheory,butactuallyasathemerunningthrougheverythingIdothisquarter,willbetotrytoconveytoyoutheskillstoreallytakethelearningalgorithmideasandreallytogetthemtoworkonaproblem.
It'ssortofhardformetostandhereandsayhowbigadealthatis,butwhenIwalkaroundcompaniesinSiliconValley,it'scompletelynotuncommonformetoseesomeoneusingsomemachinelearningalgorithmandthenexplaintomewhatthey'vebeendoingforthelastsixmonths,andIgo,oh,gee,itshouldhavebeenobviousfromthestartthatthelastsixmonths,you'vebeenwastingyourtime,rightAndsomygoalinthisclass,runningthroughtheentirequarter,notjustonlearningtheory,isactuallynotonlytogiveyouthetoolsofmachinelearning,buttoteachyouhowtousethemwell.
AndI'venoticedthisissomethingthatreallynotmanyotherclassesteach.
AndthisissomethingI'mreallyconvincedisahugedeal,andsobytheendofthisclass,Ihopeallofyouwillbemastercarpenters.
Ihopeallofyouwillbereallygoodatapplyingtheselearningalgorithmsandgettingthemtoworkamazinglywellinmanyproblems.
OkayLet'ssee.
So[inaudible]theboard.
Afterlearningtheory,there'sanotherclassoflearningalgorithmsthatIthenwanttoteachyouabout,andthat'sunsupervisedlearning.
Soyourecall,right,alittleearlierIdrewanexamplelikethis,right,whereyouhaveacoupleoffeatures,acoupleofinputvariablesandsortofmalignanttumorsandbenigntumorsorwhatever.
Andthatwasanexampleofasupervisedlearningproblembecausethedatayouhavegivesyoutherightanswerforeachofyourpatients.
Thedatatellsyouthispatienthasamalignanttumor;thispatienthasabenigntumor.
Soithadtherightanswers,andyouwantedthealgorithmtojustproducemoreofthesame.
Incontrast,inanunsupervisedlearningproblem,thisisthesortofdatayouget,okayWherespeakingloosely,you'regivenadataset,andI'mnotgonnatellyouwhattherightanswerisonanyofyourdata.
I'mjustgonnagiveyouadatasetandI'mgonnasay,"Wouldyoupleasefindinterestingstructureinthisdataset"Sothat'stheunsupervisedlearningproblemwhereyou'resortofnotgiventherightanswerforeverything.
So,forexample,analgorithmmayfindstructureinthedataintheformofthedatabeingpartitionedintotwoclusters,orclusteringissortofoneexampleofanunsupervisedlearningproblem.
SoIhopeyoucanseethis.
Itturnsoutthatthesesortofunsupervisedlearningalgorithmsarealsousedinmanyproblems.
Thisisascreenshot—thisisapictureIgotfromSueEmvee,who'saPhDstudenthere,whoisapplyingunsupervisedlearningalgorithmstotrytounderstandgenedata,soistryingtolookatgenesasindividualsandgroupthemintoclustersbasedonpropertiesofwhatgenestheyrespondto—basedonpropertiesofhowthegenesrespondtodifferentexperiments.
Anotherinterestingapplicationof[inaudible]sortsofclusteringalgorithmsisactuallyimageprocessing,thiswhichIgotfromSteveGules,who'sanotherPhDstudent.
Itturnsoutwhatyoucandoisifyougivethissortofdata,sayanimage,tocertainunsupervisedlearningalgorithms,theywillthenlearntogrouppixelstogetherandsay,gee,thissortofpixelseemstobelongtogether,andthatsortofpixelseemstobelongtogether.
Andsotheimagesyouseeonthebottom—Iguessyoucanjustbarelyseethemonthere—sotheimagesyouseeonthebottomaregroupings—arewhatthealgorithmhasdonetogroupcertainpixelstogether.
Onasmalldisplay,itmightbeeasiertojustlookattheimageontheright.
Thetwoimagesonthebottomaretwosortofidenticalvisualizationsofthesamegroupingofthepixelsinto[inaudible]regions.
Andsoitturnsoutthatthissortofclusteringalgorithmorthissortofunsupervisedlearningalgorithm,whichlearnstogrouppixelstogether,itturnsouttobeusefulformanyapplicationsinvision,incomputervisionimageprocessing.
I'lljustshowyouoneexample,andthisisarathercoolonethattwostudents,AshutoshSaxenaandMinSunheredid,whichisgivenanimagelikethis,rightThisisactuallyapicturetakenoftheStanfordcampus.
Youcanapplythatsortofclusteringalgorithmandgroupthepictureintoregions.
Letmeactuallyblowthatupsothatyoucanseeitmoreclearly.
Okay.
Sointhemiddle,youseethelinessortofgroupingtheimagetogether,groupingtheimageinto[inaudible]regions.
AndwhatAshutoshandMindidwastheythenappliedthelearningalgorithmtosaycanwetakethisclusteringanduseittobuilda3DmodeloftheworldAndsousingtheclustering,theythenhadalearningalgorithmtrytolearnwhatthe3Dstructureoftheworldlookslikesothattheycouldcomeupwitha3Dmodelthatyoucansortofflythrough,okayAlthoughmanypeopleusedtothinkit'snotpossibletotakeasingleimageandbuilda3Dmodel,butusingalearningalgorithmandthatsortofclusteringalgorithmisthefirststep.
Theywereableto.
I'lljustshowyouonemoreexample.
Ilikethisbecauseit'sapictureofStanfordwithourbeautifulStanfordcampus.
Soagain,takingthesamesortofclusteringalgorithms,takingthesamesortofunsupervisedlearningalgorithm,youcangroupthepixelsintodifferentregions.
Andusingthatasapre-processingstep,theyeventuallybuiltthissortof3DmodelofStanfordcampusinasinglepicture.
Youcansortofwalkintotheceiling,lookaroundthecampus.
OkayThisactuallyturnedouttobeamixofsupervisedandunsupervisedlearning,buttheunsupervisedlearning,thissortofclusteringwasthefirststep.
Soitturnsoutthesesortsofunsupervised—clusteringalgorithmsareactuallyroutinelyusedformanydifferentproblems,thingslikeorganizingcomputingclusters,socialnetworkanalysis,marketsegmentation,soifyou'reamarketerandyouwanttodivideyourmarketintodifferentsegmentsordifferentgroupsofpeopletomarkettothemseparately;evenforastronomicaldataanalysisandunderstandinghowgalaxiesareformed.
Thesearejustasortofsmallsampleoftheapplicationsofunsupervisedlearningalgorithmsandclusteringalgorithmsthatwe'lltalkaboutlaterinthisclass.
JustoneparticularlycoolexampleofanunsupervisedlearningalgorithmthatIwanttotellyouabout.
Andtomotivatethat,I'mgonnatellyouaboutwhat'scalledthecocktailpartyproblem,whichisimaginethatyou'reatsomecocktailpartyandtherearelotsofpeoplestandingallover.
Andyouknowhowitis,right,ifyou'reatalargeparty,everyone'stalking,itcanbesometimesveryhardtoheareventhepersoninfrontofyou.
Soimaginealargecocktailpartywithlotsofpeople.
Sotheproblemis,isthatallofthesepeopletalking,canyouseparateoutthevoiceofjustthepersonyou'reinterestedintalkingtowithallthisloudbackgroundnoiseSoI'llshowyouaspecificexampleinasecond,buthere'sacocktailpartythat'sIguessrathersparselyattendedbyjusttwopeople.
Butwhatwe'regonnadoiswe'llputtwomicrophonesintheroom,okayAndsobecausethemicrophonesarejustatslightlydifferentdistancestothetwopeople,andthetwopeoplemayspeakinslightlydifferentvolumes,eachmicrophonewillpickupanoverlappingcombinationofthesetwopeople'svoices,soslightlydifferentoverlappingvoices.
SoSpeaker1'svoicemaybemoreloudonMicrophone1,andSpeaker2'svoicemaybelouderonMicrophone2,whatever.
Butthequestionis,giventhesemicrophonerecordings,canyouseparateouttheoriginalspeaker'svoicesSoI'mgonnaplaysomeaudioclipsthatwerecollectedbyTaiYuanLeeatUCSD.
I'mgonnaactuallyplayforyoutheoriginalrawmicrophonerecordingsfromthiscocktailparty.
SothisistheMicrophone1:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Microphone2:Uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve,diez.
Instructor(AndrewNg):Soit'safascinatingcocktailpartywithpeoplecountingfromonetoten.
Thisisthesecondmicrophone:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Microphone2:Uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve,diez.
Instructor(AndrewNg):Okay.
Soinsupervisedlearning,wedon'tknowwhattherightansweris,rightSowhatwe'regoingtodoistakeexactlythetwomicrophonerecordingsyoujustheardandgiveittoanunsupervisedlearningalgorithmandtellthealgorithmwhichofthesediscoverstructureinthedata[inaudible]orwhatstructureisthereinthisdataAndweactuallydon'tknowwhattherightanswerisoffhand.
Sogivethisdatatoanunsupervisedlearningalgorithm,andwhatthealgorithmdoesinthiscase,itwilldiscoverthatthisdatacanactuallybeexplainedbytwoindependentspeakersspeakingatthesametime,anditcanfurtherseparateoutthetwospeakersforyou.
Sohere'sOutput1ofthealgorithm:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Instructor(AndrewNg):Andthere'sthesecondalgorithm:Microphone2:Uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve,diez.
Instructor(AndrewNg):Andsothealgorithmdiscoversthat,gee,thestructureunderlyingthedataisreallythattherearetwosourcesofsound,andheretheyare.
I'llshowyouonemoreexample.
Thisisa,well,thisisasecondsortofdifferentpairofmicrophonerecordings:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Microphone2:[Musicplaying.
]Instructor(AndrewNg):Sothepoorguyisnotatacocktailparty.
He'stalkingtohisradio.
There'sthesecondrecording:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Microphone2:[Musicplaying.
]Instructor(AndrewNg):Right.
Andwegetthisdata.
It'sthesameunsupervisedlearningalgorithm.
Thealgorithmisactuallycalledindependentcomponentanalysis,andlaterinthisquarter,you'llseewhy.
Andthenoutput'sthefollowing:Microphone1:One,two,three,four,five,six,seven,eight,nine,ten.
Instructor(AndrewNg):Andthat'sthesecondone:Microphone2:[Musicplaying.
]Instructor(AndrewNg):Okay.
Soitturnsoutthatbeyondsolvingthecocktailpartyalgorithm,thisspecificclassofunsupervisedlearningalgorithmsarealsoappliedtoabunchofotherproblems,likeintextprocessingorunderstandingfunctionalgradingandmachinedata,likethemagneto-encephalogramwouldbeanEEGdata.
We'lltalkaboutthatmorewhenwegoanddescribeICAorindependentcomponentanalysisalgorithms,whichiswhatyoujustsaw.
Andasanaside,thisalgorithmIjustshowedyou,itseemslikeitmustbeaprettycomplicatedalgorithm,right,totakethisoverlappingaudiostreamsandseparatethemout.
Itsoundslikeaprettycomplicatedthingtodo.
Soyou'regonnaaskhowcomplicatedisitreallytoimplementanalgorithmlikethisItturnsoutifyoudoitinMATLAB,youcandoitinonelineofcode.
SoIgotthisfromSamuelWyseatToronto,UofToronto,andtheexampleIshowedyouactuallyusedamorecomplicatedICAalgorithmthanthis.
Butnonetheless,IguessthisiswhyforthisclassI'mgoingtoaskyoutodomostofyourprogramminginMATLABandOctavebecauseifyoutrytoimplementthesamealgorithminCorJavaorsomething,Icantellyoufrompersonal,painfulexperience,youendupwritingpagesandpagesofcoderatherthanrelativelyfewlinesofcode.
I'llalsomentionthatitdidtakeresearchersmany,manyyearstocomeupwiththatonelineofcode,sothisisnoteasy.
Sothatwasunsupervisedlearning,andthenthelastofthefourmajortopicsIwannatellyouaboutisreinforcementlearning.
Andthisreferstoproblemswhereyoudon'tdoone-shotdecision-making.
So,forexample,inthesupervisedlearningcancerpredictionproblem,youhaveapatientcomein,youpredictthatthecancerismalignantorbenign.
Andthenbasedonyourprediction,maybethepatientlivesordies,andthenthat'sit,rightSoyoumakeadecisionandthenthere'saconsequence.
Youeithergotitrightorwrong.
Inreinforcementlearningproblems,youareusuallyaskedtomakeasequenceofdecisionsovertime.
So,forexample,thisissomethingthatmystudentsandIworkon.
IfIgiveyouthekeystoanautonomoushelicopter—weactuallyhavethishelicopterhereatStanford,—howdoyouwriteaprogramtomakeitfly,rightYounoticethatifyoumakeawrongdecisiononahelicopter,theconsequenceofcrashingitmaynothappenuntilmuchlater.
Andinfact,usuallyyouneedtomakeawholesequenceofbaddecisionstocrashahelicopter.
Butconversely,youalsoneedtomakeawholesequenceofgooddecisionsinordertoflyahelicopterreallywell.
SoI'mgonnashowyousomefunvideosoflearningalgorithmsflyinghelicopters.
ThisisavideoofourhelicopteratStanfordflyingusingacontrollerthatwaslearnedusingareinforcementlearningalgorithm.
SothiswasdoneontheStanfordfootballfield,andwe'llzoomoutthecamerainasecond.
You'llsortofseethetreesplantedinthesky.
Somaybethisisoneofthemostdifficultaerobaticmaneuversflownonanyhelicopterundercomputercontrol.
Andthiscontroller,whichisvery,veryhardforahumantositdownandwriteout,waslearnedusingoneofthesereinforcementlearningalgorithms.
Justawordaboutthat:Thebasicideabehindareinforcementlearningalgorithmisthisideaofwhat'scalledarewardfunction.
Whatwehavetothinkaboutisimagineyou'retryingtotrainadog.
Soeverytimeyourdogdoessomethinggood,yousay,"Gooddog,"andyourewardthedog.
Everytimeyourdogdoessomethingbad,yougo,"Baddog,"rightAndhopefully,overtime,yourdogwilllearntodotherightthingstogetmoreofthepositiverewards,togetmoreofthe"Gooddogs"andtogetfewerofthe"Baddogs.
"Sothewayweteachahelicoptertoflyoranyoftheserobotsissortofthesamething.
Everytimethehelicoptercrashes,wego,"Badhelicopter,"andeverytimeitdoestherightthing,wego,"Goodhelicopter,"andovertimeitlearnshowtocontrolitselfsoastogetmoreofthesepositiverewards.
Soreinforcementlearningis—Ithinkofitasawayforyoutospecifywhatyouwantdone,soyouhavetospecifywhatisa"gooddog"andwhatisa"baddog"behavior.
Andthenit'suptothelearningalgorithmtofigureouthowtomaximizethe"gooddog"rewardsignalsandminimizethe"baddog"punishments.
Soitturnsoutreinforcementlearningisappliedtootherproblemsinrobotics.
It'sappliedtothingsinwebcrawlingandsoon.
Butit'sjustcooltoshowvideos,soletmejustshowabunchofthem.
ThislearningalgorithmwasactuallyimplementedbyourheadTA,Zico,ofprogrammingafour-leggeddog.
IguessSamShriverinthisclassalsoworkedontheprojectandPeterRenfrewandMikeandafewothers.
ButIguessthisreallyisagooddog/baddogsinceit'sarobotdog.
Thesecondvideoontheright,someofthestudents,IguessPeter,Zico,Toncaworkingonaroboticsnake,againusinglearningalgorithmstoteachasnakerobottoclimboverobstacles.
Belowthat,thisiskindofafunexample.
AshutoshSaxenaandJeffMichaelsusedlearningalgorithmstoteachacarhowtodriveatreasonablyhighspeedsoffroadsavoidingobstacles.
Andonthelowerright,that'sarobotprogrammedbyPhDstudentEvaRoshentoteachasortofsomewhatstrangelyconfiguredrobothowtogetontopofanobstacle,howtogetoveranobstacle.
Sorry.
Iknowthevideo'skindofsmall.
Ihopeyoucansortofseeit.
OkaySoIthinkallofthesearerobotsthatIthinkareverydifficulttohand-codeacontrollerforbylearningthesesortsoflearningalgorithms.
Youcaninrelativelyshortordergetarobottodooftenprettyamazingthings.
Okay.
SothatwasmostofwhatIwantedtosaytoday.
Justacouplemorelastthings,butletmejustcheckwhatquestionsyouhaverightnow.
Soiftherearenoquestions,I'lljustclosewithtworeminders,whichareafterclasstodayorasyoustarttotalkwithotherpeopleinthisclass,Ijustencourageyouagaintostarttoformprojectpartners,totrytofindprojectpartnerstodoyourprojectwith.
Andalso,thisisagoodtimetostartformingstudygroups,soeithertalktoyourfriendsorpostinthenewsgroup,butwejustencourageyoutotrytostarttodobothofthosetoday,okayFormstudygroups,andtrytofindtwootherprojectpartners.
Sothankyou.
I'mlookingforwardtoteachingthisclass,andI'llseeyouinacoupleofdays.
[EndofAudio]Duration:69minutes

Hostodo商家提供两年大流量美国VPS主机 可选拉斯维加斯和迈阿密

Hostodo商家算是一个比较小众且运营比较久的服务商,而且还是率先硬盘更换成NVMe阵列的,目前有提供拉斯维加斯和迈阿密两个机房。看到商家这两年的促销套餐方案变化还是比较大的,每个月一般有这么两次的促销方案推送,可见商家也在想着提高一些客户量。毕竟即便再老的服务商,你不走出来让大家知道,迟早会落寞。目前,Hostodo有提供两款大流量的VPS主机促销,机房可选拉斯维加斯和迈阿密两个数据中心,且都...

国内云服务器 1核 2G 2M 15元/月 萤光云

标题【萤光云双十二 全场6折 15元/月 续费同价】今天站长给大家推荐一家国内云厂商的双十二活动。萤光云总部位于福建福州,其成立于2002 年。主打高防云服务器产品,主要提供福州、北京、上海 BGP 和香港 CN2 节点。萤光云的高防云服务器自带 50G 防御,适合高防建站、游戏高防等业务。这家厂商本次双十二算是性价比很高了。全线产品6折,上海 BGP 云服务器折扣更大 5.5 折(测试了一下是金...

DogYun香港BGP月付14.4元主机简单测试

前些天赵容分享过DogYun(狗云)香港BGP线路AMD 5950X经典低价云服务器的信息(点击查看),刚好账户还有点余额够开个最低配,所以手贱尝试下,这些贴上简单测试信息,方便大家参考。官方网站:www.dogyun.com主机配置我搞的是最低款优惠后14.4元/月的,配置单核,512MB内存,10GB硬盘,300GB/50Mbps月流量。基本信息DogYun的VPS主机管理集成在会员中心,包括...

rawtools为你推荐
京沪高铁上市首秀京沪高铁怎么老是出问题?高铁的核心技术是中国自己的吗?特朗普取消访问丹麦特朗普访华后还会去那里?newworldtheworld中文是什么意思lunwenjiance论文检测,知网的是32.4%,改了以后,维普的是29.23%。如果再到知网查,会不会超过呢?seo优化工具想找一个效果好的SEO优化软件使用,在网上找了几款不知道哪款好,想请大家帮忙出主意,用浙江哪款软件效果好www.kanav001.com长虹V001手机小游戏下载的网址是什么www.bbb551.comHUNTA551第一个第二个妹子是谁呀??bbs2.99nets.com这个"风情东南亚"网站有78kg.cn做网址又用bbs.风情东南亚.cn那么多此一举啊!www.toutoulu.com安装好派克滤芯后要检查其是否漏气45gtv.comLETSCOM是什么牌子?
台湾服务器租用 合租服务器 德国vps sharktech 服务器日志分析 远程登陆工具 网盘申请 本网站服务器在美国 qingyun 100m空间 网站木马检测工具 腾讯实名认证中心 南通服务器 网络空间租赁 免费申请网站 百度云1t 789电视剧 网站在线扫描 优酷黄金会员账号共享 贵阳电信测速 更多