GSPBOX_-A-toolbox-for-signal-processing-on-graphs_

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

GSPBOX:AtoolboxforsignalprocessingongraphsNathanaelPerraudin,JohanParatte,DavidShuman,LionelMartinVassilisKalofolias,PierreVandergheynstandDavidK.HammondMarch16,2016AbstractThisdocumentintroducestheGraphSignalProcessingToolbox(GSPBox)aframeworkthatcanbeusedtotacklegraphrelatedproblemswithasignalprocessingapproach.Itexplainsthestructureandtheorganizationofthissoftware.Italsocontainsageneraldescriptionoftheimportantmodules.1ToolboxorganizationInthisdocument,webrieflydescribethedifferentmodulesavailableinthetoolbox.Foreachofthem,themainfunctionsarebrieflydescribed.Thischaptershouldhelpmakingtheconnectionbetweenthetheoreticalconceptsintroducedin[7,9,6]andthetechnicaldocumentationprovidedwiththetoolbox.Wehighlyrecommendtoreadthisdocumentandthetutorialbeforeusingthetoolbox.Thedocumentation,thetutorialsandotherresourcesareavailableon-line1.ThetoolboxhasfirstbeenimplementedinMATLABbutaporttoPython,calledthePyGSP,hasbeenmaderecently.Asofthetimeofwritingofthisdocument,notallthefunctionalitieshavebeenportedtoPython,butthemainmodulesarealreadyavailable.Inthefollowing,functionsprefixedby[M]:refertotheMATLABimplementationandtheonesprefixedwith[P]:refertothePythonimplementation.1.1Generalstructureofthetoolbox(MATLAB)ThegeneraldesignoftheGSPBoxfocusesaroundthegraphobject[7],aMATLABstructurecontainingthenecessaryinfor-mationstousemostofthealgorithms.Bydefault,onlyafewattributesareavailable(seesection2),allowingonlytheuseofasubsetoffunctions.Inordertoenabletheuseofmorealgorithms,additionalfieldscanbeaddedtothegraphstructure.Forexample,thefollowinglinewillcomputethegraphFourierbasisenablingexactfilteringoperations.1G=gsp_compute_fourier_basis(G);Ideally,thisoperationshouldbedoneontheflywhenexactfilteringisrequired.Unfortunately,thelackofwelldefinedclassparadigminMATLABmakesittoocomplicatedtobeimplemented.Luckily,theaboveformulationpreventsanyunnecessarydatacopyofthedatacontainedinthestructureG.Inordertoavoidnameconflicts,allfunctionsintheGSPBoxstartwith[M]:gsp_.Asecondimportantconventionisthatallfunctionsapplyingagraphalgorithmonagraphsignaltakesthegraphasfirstargument.Forexample,thegraphFouriertransformofthevectorfiscomputedby1fhat=gsp_gft(G,f);1See://lts2.epfl.ch/pygspforPython.Thefulldocumentationisalsoavail-ableinasingledocument::1408.5781v2[cs.IT]15Mar2016Thegraphoperatorsaredescribedinsection4.Filteringasignalonagraphisalsoalinearoperation.However,sincethedesignofspecialfilters(kernels)isimportant,theyareregroupedinadedicatedmodule(seesection5).Thetoolboxcontainstwoadditionalimportantmodules.Theoptimizationmodulecontainsproximaloperators,projectionsandsolverscompatiblewiththeUNLocBoX[5](seesection6).Thesefunctionsfacilitatethedefinitionofconvexoptimizationproblemsusinggraphs.Finally,section??iscomposedofwellknowngraphmachinelearningalgorithms.1.2Generalstructureofthetoolbox(Python)ThestructureofthePythontoolboxfollowscloselytheMATLABone.ThemajordifferencecomesfromthefactthatthePythonimplementationisobject-orientedandthusallowsforanaturaluseofinstancesofthegraphobject.ForexampletheequivalentoftheMATLABcall:1G=gsp_estimate_lmax(G);canbeachievedusingasimplemethodcallonthegraphobject:1G.estimate_lmax()Moreover,theuseofclassforthegraphobjectallowstocomputeadditionalgraphattributesonthefly,makingthecodeclearerasitsMATLABequivalent.Notethoughthatfunctionalitiesaregroupedintodifferentmodules(onepersectionbelow)andthatseveralfunctionsthatworkongraphshavetobecalleddirectlyfromthemodules.Forexample,oneshouldwrite:1layers=pygsp.operators.kron_pyramid(G,levels)Thisisthecaseassoonasthegraphisthestructureonwhichtheactionhastobeperformedandnotourprincipalfocus.InasimilarwaytotheMATLABimplementationusingtheUNLocBoXfortheconvexoptimizationroutines,thePythonimplementationusesthePyUNLocBoX,whichisthePythonportoftheUNLocBoX.2GraphsTheGSPBoxisconstructedaroundonemainobject:thegraph.ItisimplementedasastructureinMatlabandasaclassinPython.Itstoresthenodes,theedgesandotherattributesrelatedtothegraph.Intheimplementation,agraphisfullydefinedbytheweightmatrixW,whichisthemainandonlyrequiredattribute.Sincemostgraphstructuresarefarfromfullyconnected,Wisimplementedasasparsematrix.FromtheweightmatrixaLaplacianmatrixiscomputedandstoredasanattributeofthegraphobject.Differentotherattributesareavailablesuchasplottingattributes,vertexcoordinates,thedegreematrix,thenumberofverticesandedges.Thelistofallattributesisgivenintable1.2AttributeFormatDatatypeDescriptionMandatoryfieldsWNxNsparsematrixdoubleWeightmatrixWLNxNsparsematrixdoubleLaplacianmatrixdNx1vectordoubleThediagonalofthedegreematrixNscalarintegerNumberofverticesNescalarintegerNumberofedgesplotting[M]:structure[P]:dictnonePlottingparameterstypetextstringName,typeorshortdescriptiondirectedscalar[M]:logical[P]:booleanStateifthegraphisdirectedornotlap_typetextstringLaplaciantypeOptionalfieldsANxNsparsematrix[M]:logical[P]:booleanAdjacencymatrixcoordsNx2orNx3matrixdoubleVectorsofcoordinatesin2Dor3D.lmaxscalardoubleExactorestimatedmaximume

1 / 8
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功