extended Generalized Haar-Walsh Transform
MultiscaleGraphSignalTransforms.GHWT_tf_1d.ghwt_tf_bestbasisMultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_basisrecover_newMultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_core_newMultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_initMultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_bestbasis_2dMultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_init_2dMultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_init_2dMultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_synthesis_2dMultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_synthesis_2d_core!MultiscaleGraphSignalTransforms.GHWT_tf_2d.tf2d_initMultiscaleGraphSignalTransforms.GHWT_tf_2d.tf_core_2d_colMultiscaleGraphSignalTransforms.GHWT_tf_2d.tf_core_2d_row
MultiscaleGraphSignalTransforms.GHWT_tf_1d.ghwt_tf_bestbasis — Method(dvec, BS) = ghwttfbestbasis(dmatrix::Array{Float64,3}, GP::GraphPart; cfspec::Float64 = 1.0, flatten::Any = 1.0)
Implementation of time-frequency adapted GHWT method = eGHWT. Modified from the algorithm in the paper: "A Fast Algorithm for Adapted Time Frequency Tilings" by Christoph M. Thiele and Lars F. Villemoes.
Input Arguments
dmatrix::Array{Float64,3}: the matrix of expansion coefficientsGP::GraphPart: an input GraphPart objectcfspec::Any: the specification of cost functional to be used (default: 1.0, i.e., 1-norm)flatten::Any: the method for flattening vector-valued data to scalar-valued data (default: 1.0, i.e., 1-norm)
Output Arguments
dvec::Matrix{Float64}: the vector of expansion coefficients corresponding to the eGHWT best basisBS::BasisSpec: a BasisSpec object which specifies the eGHWT best basis
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_basisrecover_new — Methodtag_tf_b_new = tf_basisrecover_new(tag_tf_b::Array{Dict{Tuple{Int,Int},Bool}},tag_tf_f::Array{Dict{Tuple{Int,Int},Bool}})
One backward iteration of time-frequency adapted GHWT method to recover the best-basis from the `tag_tf`s recorded.Input Arguments
tag_tf_b: Thedictionaryrecording the time-or-frequency information on some iteration 'i' in the main algorithmtag_tf_f: Thedictionaryrecording the time-or-frequency information on some iteration 'i+1' in the main algorithm
Output Arguments
tag_tf_b_new: The updated 'tagtfb'. Eventually the 'tag_tf' on iteration 1 will represent the selected best-basis
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_core_new — Methodcoeffdictnew,tagtf = tfcorenew(coeffdict::Array{Dict{Tuple{Int,Int},Float64},1})
One forward iteration of time-frequency adapted GHWT method. For each entry in coeffdict_new, we compare two (or one) entries in 'coeffdict' on time-direction and two (or one) entries in 'coeffdict' on frequency-direction. Those two groups reprensent the same subspace. We compare the cost-functional value of them and choose the smaller one as a new entry in 'coeffdict_new'.
Input Arguments
coeffdict: The entries of which reprensents the cost functional value of some basis-vectors' coefficients.
Output Arguments
coeffdict_new: The entries of which represents the cost functional value of some basis-vectors' coefficientstag_tf: Indicating whether the time-direction (0) or frequency direction (1) was chosen for each entry in coeffdict_new.
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_1d.tf_init — Methodcoeffdict = tf_init(dmatrix::Matrix{Float64},GP::GraphPart)
Store the expanding coeffcients from matrix into a list of dictionary (inbuilt hashmap in Julia)
Input Arguments
dmatrix: The expanding GHWT coefficients of all levels corresponding to input GPGP::GraphPart: an input GraphPart object
Output Arguments
coeffdict: The expanding GHWT coeffcients stored in a list of "dictionary" (inbuilt hashmap in Julia),coeffdict: The entrycoeffdict[j][(k,l)]corresponds to the coefficient of basis-vector on level j with region k and tag l.
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_bestbasis_2d — MethodBbasis, infovec = ghwt_tf_bestbasis_2d(dmatrix::Matrix{Float64},GProws::GraphPart,GPcols::GraphPart)Implementation of 2d time-frequency adapted GHWT method. Modified from the idea in paper "Image compression with adaptive Haar-Walsh tilings" by Maj Lindberg and Lars F. Villemoes.
Input Arguments
dmatrix: The ghwt expanding coefficients of matrix on all levels contatenated in a 2d matrix.GProws: Corresponding to the affinity matrix on rows.GPcols: Corresponding to the affinity matrix on cols.
Output Arguments
Bbasis: The coefficients of the best-basis.infovec: [infovec[i,1],infovec[i,2]] is the location of Bbasis[i] in dmatrix.
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_init_2d — Methoddmatrix = ghwt_tf_init_2d(matrix::Matrix{Float64}, GProws::GraphPart, GPcols::GraphPart)
Partition matrix first to get GProws and GPcols. Then expand matrix
in two directions to get dmatrixInput Arguments
matrix::Matrix{Float64}: an input matrixGProws::GraphPart: partitioning using rows as samplesGPcols::GraphPart: partitioning using cols as samples
Output Argument
dmatrix::matrix{Float64}: expansion coefficients of matrix
MultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_init_2d — Methoddmatrix, GProws, GPcols = ghwt_tf_init_2d(matrix::Matrix{Float64})
Partition matrix first to get GProws and GPcols. Then expand matrix
in two directions to get dmatrixInput Arguments
matrix::Matrix{Float64}: an input matrix
Output Argument
GProws::GraphPart: partitioning using rows as samplesGPcols::GraphPart: partitioning using cols as samplesdmatrix::matrix{Float64}: expansion coefficients of matrix
MultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_synthesis_2d — Methodmatrix = ghwt_tf_synthesis_2d(dmatrix::Matrix{Float64}, GProws::GraphPart, GPcols::GraphPart)Synthesis the matrix from the coefficients of selected basis vectors.
Input Arguments
dmatrix: Only selected basis vectors are nonzero with expanding coeffcients.GProws: Corresponding to the affinity matrix on rows.GPcols: Corresponding to the affinity matrix on cols.
Output Arguments
matrix: Synthesized matrix
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.ghwt_tf_synthesis_2d_core! — Methodghwt_tf_synthesis_2d_core!(dmatrix::Array{Float64,3},tag::Array{Int,2},rs::Array{Int,2})Core function of ghwttfsynthesis_2d. Synthesize on column direction
Input Arguments
dmatrix: Same size as dmatrix, but only selected basis vectors are nonzero with expanding coeffcients.tag: Tag information in GP.rs: Rs information in GP.
Output Arguments
dmatrix: Synthesized on column direction.
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.tf2d_init — Methodtf2d_init(tag::Matrix{Int},tag_r::Matrix{Int})Storing the relation between the coefficient location in the 2D coefficients matrix of all levels with the (level, tag, region) information
Input Arguments
tag: The matrix of the tag informationtag_r: The matrix of the region information
Output Arguments
tag2ind: tag2ind[(j,k,l)] is the location of the column of coefficients on level j, region k and tag lind2tag: key and item of dicionarytag2indinterchanged
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.tf_core_2d_col — Methoddmatrix_new,tag2ind_new,ind2tag_new,tag_tf = tf_core_2d_col(dmatrix::Matrix{Float64},tag2ind::Dict{Tuple{Int,Int,Int},Int},ind2tag::Dict{Int,Tuple{Int,Int,Int}},jmax::Integer)One forward iteration of 2-d time-frequency adapted ghwt on the column direction
Input Arguments
dmatrix: The cost-functional values of coeffcientstag2ind: tag2ind[(j,k,l)] is the location of the column of coefficients on level j, region k and tag lind2tag: key and item of dicionarytag2indinterchanged
Output Arguments
dmatrix_new: The cost-functional values of coeffcientstag2ind_new: tag2ind_new[(j,k,l)] is the location of the column of coefficients on level j, region k and tag lind2tag_new: key and item of dicionarytag2indinterchangedtag_tf: recording the time-or-frequency information
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)
MultiscaleGraphSignalTransforms.GHWT_tf_2d.tf_core_2d_row — Methoddmatrix_new,tag2ind_new,ind2tag_new,tag_tf = tf_core_2d_row(dmatrix::Matrix{Float64},tag2ind::Dict{Tuple{Int,Int,Int},Int},ind2tag::Dict{Int,Tuple{Int,Int,Int}},jmax::Integer)Almost the same as tfcore2dcol. But all the operations on matrix are row-wise. Due to the column-based matrix feature of Julia language. We are currently only using the tfcore2dcol here.
Input Arguments
dmatrix: The cost-functional values of coeffcientstag2ind: tag2ind[(j,k,l)] is the location of the column of coefficients on level j, region k and tag lind2tag: key and item of dicionarytag2indinterchanged
Output Arguments
dmatrix_new: The cost-functional values of coeffcientstag2ind_new: tag2ind_new[(j,k,l)] is the location of the row of coefficients on level j, region k and tag lind2tag_new: key and item of dicionarytag2indinterchangedtag_tf: recording the time-or-frequency information
Copyright 2018 The Regents of the University of California
Implemented by Yiqun Shao (Adviser: Dr. Naoki Saito)