Skip to content

benchopt/benchmark_tv_1d

Repository files navigation

Unidimensional Total variation (TV) Benchmark

Build Status Python 3.6+

This benchmark is dedicated to solver of TV-1D regularised regression problem:

u argmin u R p f ( y , A u ) + g ( D u )

  • y R n is a vector of observations or targets.
  • A R n × p is a design matrix or forward operator.
  • λ > 0 is a regularization hyperparameter.
  • f ( y , A u ) = k l ( y k , ( A u ) k ) is a loss function, where l can be quadratic loss as l ( y , x ) = 1 2 | y x | 2 2 , or Huber loss as l ( y , x ) = h δ ( y x ) defined by

h δ ( t ) = { 1 2 t 2 if | t | δ δ | t | 1 2 δ 2 otherwise

  • D R ( p 1 ) × p is a finite difference operator, such that the regularised TV-1D term g ( D u ) = λ u T V expressed as follows.

g ( D u ) = λ D u 1 = λ k = 1 p 1 | u k + 1 u k |

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:

$ 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.:

$ 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.