ebook img

MATLAB Machine Learning PDF

335 Pages·2016·9.88 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview MATLAB Machine Learning

MATLAB Machine Learning — Michael Paluszek Stephanie Thomas MATLAB Machine Learning (cid:2)(cid:2)(cid:2) Michael Paluszek Stephanie Thomas MATLABMachineLearning MichaelPaluszekandStephanieThomas NewJersey USA ISBN-13(pbk):978-1-4842-2249-2 ISBN-13(electronic):978-1-4842-2250-8 DOI10.1007/978-1-4842-2250-8 LibraryofCongressControlNumber:2016963347 Copyright©2017byMichaelPaluszek,StephanieThomas Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartofthematerialis concerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation,broadcasting,reproductionon microfilmsorinanyotherphysicalway,andtransmissionorinformationstorageandretrieval,electronicadaptation, computersoftware,orbysimilarordissimilarmethodologynowknownorhereafterdeveloped. Trademarkednames,logos,andimagesmayappearinthisbook.Ratherthanuseatrademarksymbolwithevery occurrenceofatrademarkedname,logo,orimageweusethenames,logos,andimagesonlyinaneditorialfashionandto thebenefitofthetrademarkowner,withnointentionofinfringementofthetrademark. Theuseinthispublicationoftradenames,trademarks,servicemarks,andsimilarterms,eveniftheyarenotidentifiedas such,isnottobetakenasanexpressionofopinionastowhetherornottheyaresubjecttoproprietaryrights. Whiletheadviceandinformationinthisbookarebelievedtobetrueandaccurateatthedateofpublication,neitherthe authorsnortheeditorsnorthepublishercanacceptanylegalresponsibilityforanyerrorsoromissionsthatmaybemade. Thepublishermakesnowarranty,expressorimplied,withrespecttothematerialcontainedherein. ManagingDirector:WelmoedSpahr LeadEditor:SteveAnglin TechnicalReviewers:JonahLissner,JosephMueller,andDerekSurka EditorialBoard:SteveAnglin,PramilaBalan,LauraBerendson,AaronBlack,LouiseCorrigan,Jonathan Gennick,RobertHutchinson,CelestinSureshJohn,NikhilKarkal,JamesMarkham,SusanMcDermott, MatthewMoodie,NataliePao,GwenanSpearing CoordinatingEditor:MarkPowers CopyEditor:KristenCassereauNg Compositor:SPiGlobal Indexer:SPiGlobal Artist:SPiGlobal DistributedtothebooktradeworldwidebySpringerScience+BusinessMediaNewYork,233SpringStreet,6thFloor, NewYork,NY10013.Phone1-800-SPRINGER,fax(201)348-4505,[email protected],or visitwww.springeronline.com.ApressMedia,LLCisaCaliforniaLLCandthesolemember(owner)isSpringer Science+BusinessMediaFinanceInc(SSBMFinanceInc).SSBMFinanceIncisaDelawarecorporation. Forinformationontranslations,[email protected],orvisitwww.apress.com. ApressandfriendsofEDbooksmaybepurchasedinbulkforacademic,corporate,orpromotionaluse.eBookversions andlicensesarealsoavailableformosttitles.Formoreinformation,referenceourSpecialBulkSales-eBookLicensing webpageatwww.apress.com/bulk-sales. Anysourcecodeorothersupplementarymaterialsreferencedbytheauthorinthistextareavailabletoreadersat www.apress.com.Fordetailedinformationabouthowtolocateyourbook’ssourcecode,goto www.apress.com/source-code/.ReaderscanalsoaccesssourcecodeatSpringerLinkintheSupplementary Materialsectionforeachchapter. Printedonacid-freepaper ForMarilynandMatt. Contents at a Glance AbouttheAuthors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV AbouttheTechnicalReviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIX (cid:2)PartI IntroductiontoMachineLearning 1 (cid:2)Chapter1:AnOverviewofMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . 3 (cid:2)Chapter2:TheHistoryofAutonomousLearning . . . . . . . . . . . . . . . . . . . . . . . . 17 (cid:2)Chapter3:SoftwareforMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 (cid:2)PartII MATLABRecipesforMachineLearning 33 (cid:2)Chapter4:RepresentationofDataforMachineLearninginMATLAB . . . . . . . . . . . 35 (cid:2)Chapter5:MATLABGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 (cid:2)Chapter6:MachineLearningExamplesinMATLAB . . . . . . . . . . . . . . . . . . . . . 85 (cid:2)Chapter7:FaceRecognitionwithDeepLearning. . . . . . . . . . . . . . . . . . . . . . . . 89 (cid:2)Chapter8:DataClassification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 (cid:2)Chapter9:ClassificationofNumbersUsingNeuralNetworks . . . . . . . . . . . . . . . . . 143 (cid:2)Chapter10:KalmanFilters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 (cid:2)Chapter11:AdaptiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 (cid:2)Chapter12:AutonomousDriving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 V Contents AbouttheAuthors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV AbouttheTechnicalReviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIX (cid:2)PartI IntroductiontoMachineLearning 1 (cid:2)Chapter1:AnOverviewofMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 ElementsofMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.1 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.2 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.3 Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3.1 SupervisedLearning . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3.2 UnsupervisedLearning . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3.3 SemisupervisedLearning . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3.4 OnlineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 TheLearningMachine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 TaxonomyofMachineLearning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5 AutonomousLearningMethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5.1 Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5.2 NeuralNets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.5.3 SupportVectorMachines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5.4 DecisionTrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.5.5 ExpertSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 (cid:2)Chapter2:TheHistoryofAutonomousLearning . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 ArtificialIntelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 LearningControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4 MachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.5 TheFuture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 VII CONTENTS (cid:2)Chapter3:SoftwareforMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1 AutonomousLearningSoftware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 CommercialMATLABSoftware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2.1 MathWorksProducts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2.1.1 StatisticsandMachineLearningToolbox . . . . . . . . . . . . . . . 26 3.2.1.2 NeuralNetworkToolbox . . . . . . . . . . . . . . . . . . . . . . . . 26 3.2.1.3 ComputerVisionSystemToolbox . . . . . . . . . . . . . . . . . . . 26 3.2.1.4 SystemIdentificationToolbox . . . . . . . . . . . . . . . . . . . . . 27 3.2.2 PrincetonSatelliteSystemsProducts . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.2.1 CoreControlToolbox . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.2.2 TargetTracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.3 MATLABOpen-SourceResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3.1 DeepLearnToolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3.2 DeepNeuralNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3.3 MatConvNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4 ProductsforMachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4.1 R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4.2 scikit-learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4.3 LIBSVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5 ProductsforOptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5.1 LOQO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5.2 SNOPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5.3 GLPK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.4 CVX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.5 SeDuMi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.6 YALMIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (cid:2)PartII MATLABRecipesforMachineLearning 33 (cid:2)Chapter4:RepresentationofDataforMachineLearninginMATLAB . . . . . . . . . . . 35 4.1 IntroductiontoMATLABDataTypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.1.1 Matrices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.1.2 CellArrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.1.3 DataStructures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.1.4 Numerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.1.5 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.1.6 Datastore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.1.7 TallArrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.1.8 SparseMatrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.1.9 TablesandCategoricals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.1.10 LargeMAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.2 InitializingaDataStructureUsingParameters . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 VIII CONTENTS 4.3 PerformingmapreduceonanImageDatastore . . . . . . . . . . . . . . . . . . . . . . 46 4.3.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.3.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.4 CreatingaTablefromaFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 (cid:2)Chapter5:MATLABGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.1 Two-DimensionalLinePlots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.1.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.1.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5.2 General2DGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.3 Custom2DDiagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.3.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.3.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4 Three-DimensionalBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.4.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.4.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.5 Drawa3DObjectwithaTexture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.5.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.5.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.5.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.6 General3DGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.6.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.6.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.6.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5.7 BuildingaGraphicalUserInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5.7.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5.7.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5.7.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 (cid:2)Chapter6:MachineLearningExamplesinMATLAB . . . . . . . . . . . . . . . . . . . . . 85 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.2 MachineLearning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.2.1 NeuralNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.2.2 FaceRecognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.2.3 DataClassification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.3 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.3.1 KalmanFilters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.3.2 AdaptiveControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 IX CONTENTS 6.4 ArtificialIntelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.4.1 AutonomousDrivingandTargetTracking . . . . . . . . . . . . . . . . . . . . . 88 (cid:2)Chapter7:FaceRecognitionwithDeepLearning. . . . . . . . . . . . . . . . . . . . . . . . 89 7.1 ObtainDataOnline:ForTrainingaNeuralNetwork . . . . . . . . . . . . . . . . . . . . 92 7.1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 7.1.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.1.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.2 GeneratingDataforTrainingaNeuralNet . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.2.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.2.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.3 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 7.3.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 7.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.3.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.4 ConvolutionLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.4.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.4.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 7.5 Pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.5.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.5.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.5.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.6 FullyConnectedLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.6.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.6.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.6.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.7 DeterminingtheProbability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.7.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.7.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.7.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.8 TesttheNeuralNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.8.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.8.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.8.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.9 RecognizinganImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.9.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.9.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 7.9.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 (cid:2)Chapter8:DataClassification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.1 GenerateClassificationTestData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.1.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.1.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 X CONTENTS 8.2 DrawingDecisionTrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 8.2.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 8.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 8.2.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 8.3 DecisionTreeImplementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.3.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.3.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.4 ImplementingaDecisionTree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 8.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 8.4.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 8.4.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 8.5 CreatingaHand-MadeDecisionTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.5.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.5.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.5.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.6 TrainingandTestingtheDecisionTree . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 8.6.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 8.6.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 8.6.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 (cid:2)Chapter9:ClassificationofNumbersUsingNeuralNetworks . . . . . . . . . . . . . . . . . 143 9.1 GenerateTestImageswithDefects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 9.1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 9.1.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 9.1.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 9.2 CreatetheNeuralNetTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.2.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.2.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.3 TrainaNetworkwithOneOutputNode . . . . . . . . . . . . . . . . . . . . . . . . . . 156 9.3.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 9.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 9.3.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 9.4 TestingtheNeuralNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.4.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.4.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.5 TrainaNetworkwithMultipleOutputNodes . . . . . . . . . . . . . . . . . . . . . . . . 162 9.5.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 9.5.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 9.5.3 HowItWorks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 XI

Description:
each chapter. Printed on acid-free paper Chapter 4: Representation of Data for Machine Learning in MATLAB . The MATLAB Computer Vision System Toolbox provides functions for developing computer vision sys- tems. /Users/Shared/svn/Manuals/MATLABMachineLearning/MATLAB/Cats.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.