欢迎来到天天文库
浏览记录
ID:39200155
大小:228.18 KB
页数:13页
时间:2019-06-27
《机器学习_logistic回归MATLAB练习》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ProgrammingExercise2:LogisticRegressionMachineLearningIntroductionInthisexercise,youwillimplementlogisticregressionandapplyittotwodierentdatasets.Beforestartingontheprogrammingexercise,westronglyrecommendwatchingthevideolecturesandcompletingthereviewquestion
2、sfortheassociatedtopics.Togetstartedwiththeexercise,youwillneedtodownloadthestartercodeandunzipitscontentstothedirectorywhereyouwishtocompletetheexercise.Ifneeded,usethecdcommandinOctave/MATLABtochangetothisdirectorybeforestartingthisexercise.Youcanalsondins
3、tructionsforinstallingOctave/MATLABintheEn-vironmentSetupInstructions"ofthecoursewebsite.Filesincludedinthisexerciseex2.m-Octave/MATLABscriptthatstepsyouthroughtheexerciseex2reg.m-Octave/MATLABscriptforthelaterpartsoftheexerciseex2data1.txt-Trainingsetforthe
4、rsthalfoftheexerciseex2data2.txt-Trainingsetforthesecondhalfoftheexercisesubmit.m-SubmissionscriptthatsendsyoursolutionstoourserversmapFeature.m-FunctiontogeneratepolynomialfeaturesplotDecisionBoundary.m-Functiontoplotclassier'sdecisionbound-ary[?]plotData.
5、m-Functiontoplot2Dclassicationdata[?]sigmoid.m-SigmoidFunction[?]costFunction.m-LogisticRegressionCostFunction[?]predict.m-LogisticRegressionPredictionFunction[?]costFunctionReg.m-RegularizedLogisticRegressionCost?indicateslesyouwillneedtocomplete1Throughou
6、ttheexercise,youwillbeusingthescriptsex2.mandex2reg.m.Thesescriptssetupthedatasetfortheproblemsandmakecallstofunctionsthatyouwillwrite.Youdonotneedtomodifyeitherofthem.Youareonlyrequiredtomodifyfunctionsinotherles,byfollowingtheinstructionsinthisassignment.W
7、heretogethelpTheexercisesinthiscourseuseOctave1orMATLAB,ahigh-levelprogram-minglanguagewell-suitedfornumericalcomputations.IfyoudonothaveOctaveorMATLABinstalled,pleaserefertotheinstallationinstructionsintheEnvironmentSetupInstructions"ofthecoursewebsite.Atth
8、eOctave/MATLABcommandline,typinghelpfollowedbyafunc-tionnamedisplaysdocumentationforabuilt-infunction.Forexample,helpplotwillbringuphelpinformationforplotting.FurtherdocumentationforOctav
此文档下载收益归作者所有