MatlabPARAFAC运行办法资料下载.pdf
- 文档编号:5980536
- 上传时间:2023-05-05
- 格式:PDF
- 页数:6
- 大小:350.18KB
MatlabPARAFAC运行办法资料下载.pdf
《MatlabPARAFAC运行办法资料下载.pdf》由会员分享,可在线阅读,更多相关《MatlabPARAFAC运行办法资料下载.pdf(6页珍藏版)》请在冰点文库上搜索。
i)datapre-processing,ii)initialexplorativedataanalysis,iii)modelingandmodelvalidation,iv)interpretingresults.Themorethoroughlythefirsttwophasesarecarriedout,theeasierthelattertwowillbe.Partofthepre-processingontheexampledatasethasalreadybeencarriedout(importingthedatatoMATLAB,spec-tralcorrections,calibrations,etc.).Thisisveryinstrumentspe-cificandthereforenotappropriateforthistutorial,whichfocusonthemodelingofthedata.DuringthistutorialanystatementstobewritteninMAT-LABwillbewritteningreenwithCourierNewfont.WhenwritingintheCommandWindow,notethatMATLABiscasesensitive.A.SettingupMATLABtorunwithN-waytoolboxandDOMFluortoolbox.1.DecideonasensibleplacetolocatetheDOMFluortoolboxonyourcomputer.(Thiscould,forexample,beC:
ProgramFilesMATLABR2007btoolboxbutcanalsobeelsewhere).CreateafolderandnameitDOMFluor.Extractthecontentsofthezipfile“DOM-Fluor.zip”intotheDOMFluorfolder.2.StartMATLAB.SelectFilemenuthenclickSetpath.ClickAddwithsubfoldersandlocatetheDOMFluorfolderyoucreatedinStep1above.IftheN-Waytool-boxiscurrentlyinstalled,removeitfromthePathlisttoavoidconflicts.TheN-WaytoolboxisincludedaspartoftheDOMFluortoolbox.ClickSavethenClose.YouhavenowassociatedtheDOMFluortool-boxwithMATLABandthismeansthatthefunctionsinthesefolderscanberecognized.3.TocheckthatthetoolboxesarecorrectlyassociatedyoucantypeDOMFluorandpressenterintheCommandWindowinMATLAB.If“Yes”isprintedtotheCommandWindow,thetool-boxisinstalled.Ifredtextappearsthetoolboxhasnotbeencorrectlyinstalled.RedoStep2.Notethatifyouhaveothertoolboxeswithsimilarlynamedfunctions,onlythefunctionupmostinthefolder-listwillworkproperly.4.SectionAwillhavetoberepeatedifanewversionofMATLABisinstalled.B.LoadingthetutorialdataandplottingtheEEMs.1.TypeloadPARAFACexample.matintheCommandWindow.ThiswillloadthetutorialdataintotheMATLABWorkspace.ThisconsistsofadatastructurecalledOriginalData.TrytypingOriginalDataCharacterizingdissolvedorganicmatterfluorescencewithparal-lelfactoranalysis:
atutorialColinA.Stedmon1*andRasmusBro21DepartmentofMarineEcology,NationalEnvironmentalResearchInstitute,AarhusUniversity,Frederiksborgvej399,Roskilde,Denmark2Dept.FoodScience,FacultyofLifeSciences,UniversityCopenhagen,Rolighedsvej30,DK-1958,Frederiksberg,Denmark*Correspondingauthore-mail:
cstdmu.dk,Tel:
+4546301805.Limnol.Oceanogr.:
Methods6,20082008,bytheAmericanSocietyofLimnologyandOceanography,Inc.inthecommandwindow.Thiswilloutputthefollowing:
Thisdetailsthedatathatiscontainedwithinthedatastructure.i.Ex-isalistoftheexcitationwavelengthsmea-sured(innm).Inthiscase240to450every5nm.ii.Em-isalistoftheemissionwavelengthsmea-sured(innm).Inthiscase300to600every2nm.iii.X-isthefluorescencedataasathreedimen-sionalarray(65samplesx151emissionwave-lengthsx43excitationwavelengths).iv.nSample,nExandnEm:
statethenumberofsamples,excitationandemissionwavelengths.v.XBackup-isabackupcopyofthedataandnotusedinthetutorial.2.NowwewillplottheEEMstocheckthatthedataiscorrectlyloaded.Inthetoolboxthereareseveralfunc-tionsthatcanbeusedtoplotEEMs.a.TypingPlotEEMby1(1:
5,OriginalData,R.U.)willplotthefirst5EEMsinthedatasetoneatatimeascontourplots.Thenextgraphcanbeviewedbypressinganykeyonthekeyboard.If1:
5isreplacedwith1:
65all65sampleswillbeplottedoneatatime.TheplottingprocesscanbehaltedatanytimebyenteringCtrl+ConthekeyboardandthenclosingtheFigurewindow.b.TypingPlotEEMby4(1,OriginalData,R.U.)willplotthedatafouratatime.Thisisquickerwhendealingwithlargedatasets.c.TypingPlotEEMby4FixZ(1,OriginalData,R.U.)doesthesameasabovebutplotsthedatawithafixedz-axis(colorbarscale)automaticallyderivedfromtheminandmaxmeasureddata.3.Tryusingthethreefunctions.AlsotrytypinghelpPlotEEMby1,helpPlotEEMby4,andfinallyhelpPlotEEMby4FixZ.SomeinstructionsonhowtousethefunctionsareprintedtotheCommandWindow.ThisistrueforallfunctionsinMATLAB(e.g.trytyp-inghelpload).4.SurfaceplotscanalsobeplottedinasimilarwayusingthePlotSurfby1,andPlotSurfby4functions.C.Cuttingtheregionofthespectrainfluencedbyscatterpeaks.1.Thisstepcreatesanewcopyofthedatawherethewavelengthsinfluencedbyscatterpeakshavebeencutandreplacedwithmissingvaluesorzeros.TypeCutData=EEMCut(OriginalData,20,20,NaN,NaN,No)thedatawillbecutandthenplottedsothattheEEMsbeforeandafterthecutcanbecompared.Thegraphswillplotautomaticallyfromthefirstsampletothelast.Thefunctiondeletesthedataintheregionofnofluorescence(whereemissionwavelengthislessthanexcitationwavelength)andtheregionsgreatlyinflu-encedbyfirstorderscatter(whereRayleighandRamanpeaksdominatethesignal)andreplacesthemwithmissingvalues(“NaN”(NotANumber)inMAT-LAB).AdditionallyaregionofzerosisinsertedtoassistthePARAFACmodeling.2.TypehelpEEMCuttoreadanexplanationofwhatthisfunctiondoes.3.Experimentwithchangingtheinputvaluesfor(20,20,NaN,NaN,No)andobservehowthedataiscutdifferently.4.BeforeproceedingwiththetutorialtypeCutData=EEMCut(OriginalData,20,20,NaN,NaN,)sothatthedataisprocessedappropriatelyfortherestofthetutorial.Thiswillcutthedata,butnotplottheresults.D.Initialexplorativedataanalysisandoutlieridentification.Inthisstep,aseriesofPARAFACmodelsareruninordertoexplorethedataforoutliersamples,noisywavelengths,orotherpotentialproblemswiththedatathatarenoteasilyidentifiedbyvisualanalysisoftheEEMplots.Thestepisstruc-turedintotwotests:
oneontheoriginal(complete)dataandasecondonamodifieddatasetwhereoutliershavebeenremoved.ThedatasetcanbereducedinsizebyselectingeveryotherEmissionwavelength,(i.e.300,304,306.nm,insteadofthemeasured300,302,304,306.Thiswillspeedthemod-StedmonandBroFluorescence-PARAFACanalysisofDOM2elingprocessconsiderably,withoutnecessarilynotablyinflu-encingtheoutcome(exceptthespectralresolutionoftheloadings).Thisisnotdoneherebuttryitoutlater.Theques-tionstobeaddressedhereare;
-Aretherespecificsamplesorwavelengthsthatareinflu-encingthemodelfitmuchmorethantheothers?
-Whatseemstobetheappropriate“ballpark”numberofPARAFACcomponents(i.e.thenumberofdistinctfluores-centphenomena)?
3-5components,8-10?
etc.Whendothespectraofthecomponentsfoundbeginnottolooklikeorganicfluorophoresbutmorelikescatterpeaksornoise?
1.TypehelpOutlierTestintotheCommandWindowandreadtheexplanationofthefunction.2.TypeTest1=OutlierTest(CutData,2,1,7,No,No)toperformthefirsttest.Afterpressinganykeythiswillrunaseriesofmodelsfrom2componentsto7components.Theresultsfromtheseinitialfivemod-els(2,3,4,5,6and7componentmodels)canbeeval-uatedinmanywaysbutforthistutorialwewillusetwotypesofplots;
loadingsandleverages.Thesetestswilltakeapprox3minutesforyourcomputertorun.3.TypehelpPlotLoadingsandreadaboutthefunctionthentypePlotLoadings(Test1,2)andafigurewillbecreatedshowingthescoresandloadingsofthemodel(a,bandcinEquation1).4.Plotsbandcshowtheemissionandexcitationload-ingsofthetwocomponents.Plotashowshowtheconcentrationofthetwocomponentsvariesbetweensamples.Checkthattheloadingslookreasonable,i.e.thattheyaresmoothandspectralappearancethatcor-respondswellwithyourunderstandingofthedata.5.Anotherusefulplotisthatofleverages.TypehelpPlotLeverageandreadaboutthefunctionandthentypePlotLeverage(Test1,2)andafigurewillbecreatedshowingtheleverages.Intheplot,lookforsamplesthathaveextremeleveragesindicatingextremeandpotentiallyoutlyingsamples.6.Tip:
UsingthefunctionPlotLLcreatesacombinationofboththeleverageandloadingplots.TrytypingPlotLL(Test1,2)7.Nowtrycreatingthesameplotsfortheothermodels(3,4,5,6and7components).Afterexaminingtheloadingplotsitshouldbeapparentthatweneedtobegintoconstrainthemodel.Someofthe
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MatlabPARAFAC 运行 办法