1 |
1 |
2 # Proximal methods for point source localisation: the implementation |
2 # Proximal methods for point source localisation: the implementation |
3 |
3 |
4 This package contains [Rust] codes for the manuscript “_Proximal methods for |
4 This package contains the [Rust] codes for the numerical experiments in the articles |
5 point source localisation_” ([arXiv:2212.02991]) by Tuomo Valkonen |
5 * T. Valkonen, “_Proximal methods for |
6 ⟨tuomov@iki.fi⟩. It concerns solution of problems of the type |
6 point source localisation_”, Journal of Nonsmooth Analysis and Optimization 4 (2023), 10433, [doi:10.46298/jnsao-2023-10433] ([arXiv:2212.02991]) |
|
7 * T. Valkonen, “_Point source localisation with unbalanced optimal transport_” (2025), submitted. |
|
8 |
|
9 It concerns solution of problems of the type |
7 $$ |
10 $$ |
8 \min_{μ ∈ ℳ(Ω)}~ F(μ) + λ \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ), |
11 \min_{μ ∈ ℳ(Ω)}~ F(μ) + λ \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ), |
9 $$ |
12 $$ |
10 where $F$ is a data term, and $ℳ(Ω)$ is the space of Radon measures on the |
13 where $F$ is a data term, and $ℳ(Ω)$ is the space of Radon measures on the |
11 (rectangular) domain $Ω ⊂ ℝ^n$. Implemented are $F(μ)=\frac12\|Aμ-b\|_2^2$ and |
14 (rectangular) domain $Ω ⊂ ℝ^n$. Implemented are $F(μ)=\frac12\|Aμ-b\|_2^2$ and |
12 $F(μ)=\|Aμ-b\|_1$ for the forward operator $A \in 𝕃(ℳ(Ω); ℝ^m)$ modelling a |
15 $F(μ)=\|Aμ-b\|_1$ for the forward operator $A \in 𝕃(ℳ(Ω); ℝ^m)$ modelling a |
13 simple sensor grid. For the 2-norm-squared data term implemented are the |
16 simple sensor grid. |
14 algorithms μFB, μFISTA, and μPDPS from the aforementioned manuscript along with |
|
15 comparison relaxed and fully corrective conditional gradient methods from the |
|
16 literature. For the 1-norm data term only the μPDPS is applicable. |
|
17 |
17 |
18 ## Installation and usage |
18 ## Installation and usage |
19 |
19 |
20 ### Installing dependencies |
20 ### Installing dependencies |
21 |
21 |
34 this can be done with |
34 this can be done with |
35 ```console |
35 ```console |
36 brew install gsl |
36 brew install gsl |
37 ``` |
37 ``` |
38 For other operating systems, suggestions are available in the [rust-GSL] |
38 For other operating systems, suggestions are available in the [rust-GSL] |
39 crate documentation. On Windows, you will likely need to pass extra |
39 crate documentation. You may need to pass extra `RUSTFLAGS` options to |
40 `RUSTFLAGS` options to Cargo in the following steps to locate the library. |
40 Cargo in the following steps to locate the library. |
41 |
41 |
42 4. Download [alg_tools] and unpack it under the same directory as this |
42 4. Download [alg_tools] and unpack it under the same directory as this |
43 package. |
43 package. |
44 |
44 |
45 [rustup]: https://rustup.rs |
45 [rustup]: https://rustup.rs |
47 [Rust]: https://www.rust-lang.org/ |
47 [Rust]: https://www.rust-lang.org/ |
48 [GNU Scientific Library]: https://www.gnu.org/software/gsl/ |
48 [GNU Scientific Library]: https://www.gnu.org/software/gsl/ |
49 [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/ |
49 [rust-GSL]: https://docs.rs/GSL/6.0.0/rgsl/ |
50 [Homebrew]: https://brew.sh |
50 [Homebrew]: https://brew.sh |
51 [arXiv:2212.02991]: https://arxiv.org/abs/2212.02991 |
51 [arXiv:2212.02991]: https://arxiv.org/abs/2212.02991 |
|
52 [doi:10.46298/jnsao-2023-10433]: http://doi.org/10.46298/jnsao-2023-10433 |
52 |
53 |
53 ### Building and running the experiments |
54 ### Building and running the experiments |
54 |
55 |
55 To compile the code and run the experiments in the manuscript, use |
56 To compile and install the program, use |
|
57 ```console |
|
58 cargo install --path=. |
|
59 ``` |
|
60 When doing this for the first time, several dependencies will be downloaded. |
|
61 Now you can run the default set of experiments with |
|
62 ``` |
|
63 pointsource_algs -o results |
|
64 ``` |
|
65 The `-o results` option tells `pointsource_algs` to write results in the |
|
66 `results` directory. The option is required. |
|
67 |
|
68 Alternatively, you may build and run the program without installing with |
56 ```console |
69 ```console |
57 cargo run --release -- -o results |
70 cargo run --release -- -o results |
58 ``` |
71 ``` |
59 When doing this for the first time, several dependencies will be downloaded. |
72 The double-dash separates the options for the Cargo build system |
60 The double-dash (`--`) separates the arguments of Cargo and this software, |
73 and `pointsource_algs`. |
61 `pointsource_algs`. The `--release` option to Cargo is required for `rustc` to |
|
62 build optimised high performance code. Without that flag the performance will |
|
63 be significantly worse. The `-o results` option tells `pointsource_algs` to |
|
64 write results in the `results` directory. The option is required. |
|
65 |
|
66 Alternatively, you may build the executable with |
|
67 ```console |
|
68 cargo build --release |
|
69 ``` |
|
70 and then run it with |
|
71 ``` |
|
72 target/release/pointsource_algs -o results |
|
73 ``` |
|
74 |
74 |
75 ### Documentation |
75 ### Documentation |
76 |
76 |
77 Use the `--help` option to get an extensive listing of command line options to |
77 Use the `--help` option to get an extensive listing of command line options to |
78 customise algorithm parameters and the experiments performed. As above with |
78 customise algorithm parameters and the experiments performed. |
79 `-o`, if using `cargo` to run the executable, you have to pass any arguments |
|
80 to `pointsource_algs` after a double-dash: |
|
81 ```console |
|
82 cargo run --release -- --help |
|
83 ``` |
|
84 |
79 |
85 ## Internals |
80 ## Internals |
86 |
81 |
87 If you are interested in the program internals, the integrated source code |
82 If you are interested in the program internals, the integrated source code |
88 documentation may be built and opened with |
83 documentation may be built and opened with |