This repository contains the code to generate the figures in the paper
with the accompanying software package SpectralDistances.jl.
The code is written in Julia, https://julialang.org/
- Install julia v1.4 or later (instructions)
- To ensure that the same environment is instantiated as was used to create the figures in the paper, use the Manifest.toml file checked into this repository. Navigate to the folder of this repo, start julia, then run
julia> using Pkg
julia> pkg"activate ." # Activate the current folder's environment
julia> pkg"instantiate -m" # Instantiate the environment, this installs all packages
- Examples can now be run by including the corresponding script. Example:
julia> include("kbarycenters_birds.jl")
Dpending on which backend is chosen for Plots.jl, you may only see the last plot produced by each script. For scripts that produce more than one plot, you may opt to execute individual blocks of code separately.
The code assumes that the datasets provided under the links below exist in subfolders to this folder, named
./birds
: Available here Birds data: 2.5GB train, 356 MB test. (google drive)./ships
: Included in this repo.
cumulative_spectra.jl
reproduces figure 2.varying_parameters.jl
reproduces figures 4-5.lowrankmodels.jl
reproduces figure 7.interpolation.jl
reproduces figures 8-9.ship_detection.jl
reproduces figures 10-11.kbarycenters_birds.jl
reproduces figure 12. This script requires thebirds
dataset listed above.