https://github.com/benchopt/benchmark_tv_1d
TV Denoising in 1D
https://github.com/benchopt/benchmark_tv_1d
Last synced: 11 months ago
JSON representation
TV Denoising in 1D
- Host: GitHub
- URL: https://github.com/benchopt/benchmark_tv_1d
- Owner: benchopt
- Created: 2022-03-21T08:46:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T12:17:37.000Z (almost 2 years ago)
- Last Synced: 2025-05-08T22:05:12.317Z (about 1 year ago)
- Language: Python
- Size: 153 KB
- Stars: 2
- Watchers: 3
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Unidimensional Total variation (TV) Benchmark
=============================================
|Build Status| |Python 3.6+|
This benchmark is dedicated to solver of TV-1D regularised regression problem:
$$\\boldsymbol{u} \\in \\underset{\\boldsymbol{u} \\in \\mathbb{R}^{p}}{\\mathrm{argmin}} f(\\boldsymbol{y}, A \\boldsymbol{u}) + g(D\\boldsymbol{u})$$
- $\\boldsymbol{y} \\in \\mathbb{R}^{n}$ is a vector of observations or targets.
- $A \\in \\mathbb{R}^{n \\times p}$ is a design matrix or forward operator.
- $\\lambda > 0$ is a regularization hyperparameter.
- $f(\\boldsymbol{y}, A\\boldsymbol{u}) = \\sum\\limits\_{k} l(y\_{k}, (A\\boldsymbol{u})_{k})$ is a loss function, where $l$ can be quadratic loss as $l(y, x) = \\frac{1}{2} \\vert y - x \\vert_2^2$, or Huber loss as $l(y, x) = h\_{\\delta} (y - x)$ defined by
$$
h\_{\\delta}(t) = \\begin{cases} \\frac{1}{2} t^2 & \\mathrm{ if } \\vert t \\vert \\le \\delta \\\\ \\delta \\vert t \\vert - \\frac{1}{2} \\delta^2 & \\mathrm{ otherwise} \\end{cases}
$$
- $D \\in \\mathbb{R}^{(p-1) \\times p}$ is a finite difference operator, such that the regularised TV-1D term $g(D\\boldsymbol{u}) = \\lambda \\| \\boldsymbol{u} \\|_{TV}$ expressed as follows.
$$g(D\\boldsymbol{u}) = \\lambda \\| D \\boldsymbol{u} \\|\_{1} = \\lambda \\sum\\limits\_{k = 1}^{p-1} \\vert u\_{k+1} - u\_{k} \\vert $$
where n (or `n_samples`) stands for the number of samples, p (or `n_features`) stands for the number of features.
Install
--------
This benchmark can be run using the following commands:
.. code-block::
$ pip install -U benchopt
$ git clone https://github.com/benchopt/benchmark_tv_1d
$ benchopt run benchmark_tv_1d
Apart from the problem, options can be passed to `benchopt run`, to restrict the benchmarks to some solvers or datasets, e.g.:
.. code-block::
$ benchopt run benchmark_tv_1d --config benchmark_tv_1d/example_config.yml
Use `benchopt run -h` for more details about these options, or visit https://benchopt.github.io/api.html.
.. |Build Status| image:: https://github.com/benchopt/benchmark_tv_1d/workflows/Tests/badge.svg
:target: https://github.com/benchopt/benchmark_tv_1d/actions
.. |Python 3.6+| image:: https://img.shields.io/badge/python-3.6%2B-blue
:target: https://www.python.org/downloads/release/python-360/