(Lapped) Hierarchical Graph Laplacian Eigen Transform

MultiscaleGraphSignalTransforms.HGLET.HGLET_AnalysisFunction

function HGLET_Analysis(G::GraphSig, GP::GraphPart, gltype::Symbol = :L)

For a GraphSig object 'G', generate the matrix of HGLET expansion
coefficients corresponding to the eigenvectors of specified version of
the graph Laplacian matrix, i.e., either L, Lrw, or Lsym

Input Arguments

  • G: a GraphSig object
  • GP: a GraphPart object
  • gltype: :L, :Lrw, or :Lsym, indicating which eigenvectors are used

Output Argument

  • dmatrix: the matrix of expansion coefficients using the specific GL matrix
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_Analysis_AllMethod

function HGLETAnalysisAll(G::GraphSig, GP::GraphPart)

For a GraphSig object 'G', generate the 3 matrices of HGLET expansion 
coefficients corresponding to the eigenvectors of L, Lrw and Lsym

Input Arguments

  • G: a GraphSig object
  • GP: a GraphPart object

Output Argument

  • dmatrixH: the matrix of expansion coefficients for L
  • dmatrixHrw: the matrix of expansion coefficients for Lrw
  • dmatrixHsym: the matrix of expansion coefficients for Lsym
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_BestBasisMethod

function HGLET_BestBasis(GP::GraphPart; dmatrix::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), gltype::Symbol = :L, cfspec::Any = 0.1, flatten::Any = 1)

Select the HGLET best basis from the input matrix of expansion coefficients

Input Arguments

  • GP: a GraphPart object
  • dmatrix: the matrix of HGLET expansion coefficients
  • gltype: the type of graph Laplacian matrix used for HGLET dictionary (default = :L)
  • cfspec: the cost functional specification to be used: see utils.jl for the detail. If it's a number, say, p, then the l^p norm is used. If it's a function, then that function is used. Default is 0.1, i.e., l^0.1
  • flatten: the method for flattening vector-valued data to scalar-valued data; If it's a number, say, p, then the sum of the l^p norm is computed. There are many other options, such as :ash, :entropy, etc. See utils.jl for the detail. Default is 1, i.e, the sum of the l^1 norm of the coefs.

Output Argument

  • dvec: the vector of expansion coefficients corresponding to the bestbasis
  • BS: a BasisSpec object which specifies the best basis
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_GHWT_BestBasisMethod

function HGLETGHWTBestBasis(GP::GraphPart; dmatrixH::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixHrw::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixHsym::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixG::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), cfspec::Any = 0.1,flatten::Any = 1)

Select the best basis from several matrices of expansion coefficients

Input Arguments

  • dmatrixH: the matrix of HGLET expansion coefficients ==> eigenvectors of L
  • dmatrixHrw: the matrix of HGLET expansion coefficients ==> eigenvectors of Lrw
  • dmatrixHsym: the matrix of HGLET expansion coefficients ==> eigenvectors of Lsym
  • dmatrixG: the matrix of GHWT expansion coefficients
  • GP: a GraphPart object
  • cfspec: the cost functional specification to be used: see utils.jl for the detail. If it's a number, say, p, then the l^p norm is used. If it's a function, then that function is used. Default is 0.1, i.e., l^0.1
  • flatten: the method for flattening vector-valued data to scalar-valued data; If it's a number, say, p, then the sum of the l^p norm is computed. There are many other options, such as :ash, :entropy, etc. See utils.jl for the detail. Default is 1, i.e, the sum of the l^1 norm of the coefs.

Output Argument

  • dvec: the vector of expansion coefficients corresponding to the bestbasis
  • BS: a BasisSpec object which specifies the best basis
  • trans: specifies which transform was used for that portion of the signal: 00 = HGLET with L 01 = HGLET with Lrw 10 = HGLET with Lsym 11 = GHWT
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_GHWT_BestBasis_minrelerrorMethod

function HGLETGHWTBestBasis_minrelerror(GP::GraphPart, G::GraphSig; dmatrixH::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixHrw::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixHsym::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), dmatrixG::Array{Float64,3} = Array{Float64,3}(undef,0,0,0), compare::Bool = true)

Find the best basis for approximating the signal 'G' by performing the 
    best basis search with a range of tau-measures as cost functionals
    (tau = 0.1,0.2,...,1.9) and minimizing the relative error.

Input argument:

  • dmatrixH: the matrix of HGLET expansion coefficients ==> eigenvectors of L
  • dmatrixHrw: the matrix of HGLET expansion coefficients ==> eigenvectors of Lrw
  • dmatrixHsym: the matrix of HGLET expansion coefficients ==> eigenvectors of Lsym
  • dmatrixG: the matrix of GHWT expansion coefficients
  • GP: a GraphPart object
  • G: the GraphSig object
  • compare: if it is false, don't compare the hybrid best basis to the GHWT fine-to-coarse best basis

Output argument:

  • dvec: the vector of expansion coefficients corresponding to the bestbasis
  • BS: a BasisSpec object which specifies the best basis
  • trans: specifies which transform was used for that portion of the signal 00 = HGLET with L 01 = HGLET with Lrw 10 = HGLET with Lsym 11 = GHWT
  • tau: the tau that yields the smallest relative error
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_GHWT_SynthesisMethod

function HGLETGHWTSynthesis(dvec::Matrix{Float64},GP::GraphPart,BS::BasisSpec,trans::Array{Bool,2},G::GraphSig)

Given a vector of HGLET & GHWT expansion coefficients, info about the
graph partitioning, and the choice of basis and corresponding transforms,
reconstruct the signal.

Input Arguments

  • dvec: the expansion coefficients corresponding to the chosen basis
  • GP: a GraphPart object
  • BS: a BasisSpec object
  • trans: a specification of the transforms used for the HGLET-GHWT hybrid transform 00 = HGLET with L 01 = HGLET with Lrw 10 = HGLET with Lsym 11 = GHWT
  • G: a GraphSig object

Output Argument

  • f: the reconstructed signal
  • GS: the reconstructed GraphSig object
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_SynthesisMethod

function HGLET_Synthesis(dvec::Vector{Float64}, GP::GraphPart, BS::BasisSpec, G::GraphSig; gltype::Symbol = :L)

Input Arguments

  • dvec: the expansion coefficients corresponding to the chosen basis
  • GP: a GraphPart object
  • BS: a BasisSpec object
  • G: a GraphSig object
  • gltype: :L, :Lrw, or :Lsym, indicating which eigenvectors are used

Output Argument

  • f: the reconstructed signal
  • GS: the reconstructed GraphSig object
source
MultiscaleGraphSignalTransforms.HGLET.HGLET_jklMethod

function HGLET_jkl(GP::GraphPart, drow::Int, dcol::Int)

Generate the (j,k,l) indices for the HGLET basis vector corresponding to
    the coefficient dmatrix(drow,dcol)

Input Arguments

  • GP: a GraphPart object
  • drow: the row of the expansion coefficient
  • dcol: the column of the expansion coefficient

Output Argument

  • j: the level index of the expansion coefficient
  • k: the subregion index of the expansion coefficient
  • l: the eigenvector index of the expansion coefficient
source
MultiscaleGraphSignalTransforms.HGLET_dictionaryMethod
HGLET_dictionary(GP::GraphPart, G::GraphSig; gltype::Symbol = :L)

assemble the whole HGLET dictionary

Input Arguments

  • GP: a GraphPart object
  • G: a GraphSig object
  • gltype: :L or :Lsym

Output Argument

  • dictionary: the HGLET dictionary
source
MultiscaleGraphSignalTransforms.LPHGLET_Analysis_AllMethod
function LPHGLET_Analysis_All(G::GraphSig, GP::GraphPart; ϵ::Float64 = 0.3)

For a GraphSig object 'G', generate the 2 matrices of Lapped-HGLET expansion coefficients corresponding to the eigenvectors of L and Lsym

Input Arguments

  • G: a GraphSig object
  • GP: a GraphPart object
  • ϵ: relative action bandwidth (default: 0.3)

Output Argument

  • dmatrixlH: the matrix of expansion coefficients for L
  • dmatrixlHsym: the matrix of expansion coefficients for Lsym
  • GP: a GraphPart object
source
MultiscaleGraphSignalTransforms.LPHGLET_SynthesisMethod
function LPHGLET_Synthesis(dvec::Vector{Float64}, GP::GraphPart, BS::BasisSpec, G::GraphSig; gltype::Symbol = :L, ϵ::Float64 = 0.3)

Perform Lapped-HGLET Synthesis transform

Input Arguments

  • dvec: the expansion coefficients corresponding to the chosen basis
  • GP: a GraphPart object
  • BS: a BasisSpec object
  • G: a GraphSig object
  • gltype: :L or :Lsym, indicating which eigenvectors are used
  • ϵ: relative action bandwidth (default: 0.3)

Output Argument

  • f: the reconstructed signal
  • GS: the reconstructed GraphSig object
source
MultiscaleGraphSignalTransforms.LPHGLET_dictionaryMethod
LPHGLET_dictionary(GP::GraphPart, G::GraphSig; gltype::Symbol = :L, ϵ::Float64 = 0.3)

assemble the whole LP-HGLET dictionary

Input Arguments

  • GP: a GraphPart object
  • G: a GraphSig object
  • gltype: :L or :Lsym
  • ϵ: relative action bandwidth (default: 0.3)

Output Argument

  • dictionary: the LP-HGLET dictionary
source