elsa proximity operators¶
Table of Contents
ProximityOperator¶
-
template<typename
data_t
= real_t>
classelsa
::
ProximityOperator
: public elsa::Cloneable<ProximityOperator<real_t>>¶ Base class representing a proximity operator prox.
This class represents a proximity operator prox, expressed through its apply methods, which implement the proximity operator of f with penalty r i.e.
$ prox_{f,\rho}(v) = argmin_{x}(f(x) + (\rho/2)·\| x - v \|^2_2). $- Author
Andi Braimllari - initial code
- Template Parameters
data_t
: data type for the values of the operator, defaulting to real_t
Concrete implementations of proximity operators will derive from this class and override the applyImpl method.
References: https://stanford.edu/~boyd/papers/pdf/admm_distr_stats.pdf
Public Functions
-
ProximityOperator
() = delete¶ delete no-args constructor to prevent creation of an object without a DataDescriptor
-
ProximityOperator
(const DataDescriptor &descriptor)¶ Override to construct an actual proximity operator for one of the derived classes from the given DataDescriptor descriptor.
- Parameters
[in] descriptor
: DataDescriptor describing the operator values
-
ProximityOperator
(const ProximityOperator<data_t>&) = delete¶ delete copy construction
-
auto
operator=
(const ProximityOperator&) -> ProximityOperator& = delete¶ delete implicitly declared copy assignment to prevent copy assignment
-
~ProximityOperator
() override = default¶ default destructor
-
auto
getRangeDescriptor
() const -> const DataDescriptor&¶ return the DataDescriptor
-
auto
apply
(const DataContainer<data_t> &v, geometry::Threshold<data_t> t) const -> DataContainer<data_t>¶ apply the proximity operator to an element in the operator’s domain
Please note: this method uses apply(v, t, prox(v)) to perform the actual operation.
- Return
prox DataContainer containing the application of the proximity operator to data v, i.e. in the range of the operator
- Parameters
[in] v
: input DataContainer[in] t
: input Threshold
-
void
apply
(const DataContainer<data_t> &v, geometry::Threshold<data_t> t, DataContainer<data_t> &prox) const¶ apply the proximity operator to an element in the operator’s domain
Please note: this method calls the method applyImpl that has to be overridden in derived classes. (Why is this method not virtual itself? Because you cannot have a non-virtual function overloading a virtual one [apply with one vs. two arguments]).
- Parameters
[in] v
: input DataContainer[in] t
: input Threshold[out] prox
: output DataContainer
Protected Functions
-
void
applyImpl
(const DataContainer<data_t> &v, geometry::Threshold<data_t> t, DataContainer<data_t> &prox) const = 0¶ the apply method that has to be overridden in derived classes
-
auto
isEqual
(const ProximityOperator<data_t> &other) const -> bool override¶ overridden comparison method based on the DataDescriptor
SoftThresholding¶
-
template<typename
data_t
= real_t>
classelsa
::
SoftThresholding
: public elsa::ProximityOperator<real_t>¶ Class representing the proximity operator of the l1 norm.
This class represents the soft thresholding operator, expressed by its apply method through the function i.e.
$ prox(v) = sign(v)·(|v| - t)_+. $- Author
Andi Braimllari - initial code
- Template Parameters
data_t
: data type for the values of the operator, defaulting to real_t
References: http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode93.html
Public Functions
-
SoftThresholding
(const DataDescriptor &descriptor)¶ Construct a SoftThresholding operator from the given DataDescriptor.
- Parameters
[in] descriptor
: DataDescriptor describing the operator values
-
~SoftThresholding
() override = default¶ default destructor
Protected Functions
-
void
applyImpl
(const DataContainer<data_t> &v, geometry::Threshold<data_t> t, DataContainer<data_t> &prox) const override¶ apply the proximity operator of the l1 norm to an element in the operator’s domain
- Parameters
[in] v
: input DataContainer[in] t
: input Threshold[out] prox
: output DataContainer
-
auto
cloneImpl
() const -> SoftThresholding<data_t>* override¶ implement the polymorphic clone operation
-
auto
isEqual
(const ProximityOperator<data_t> &other) const -> bool override¶ implement the polymorphic comparison operation
HardThresholding¶
-
template<typename
data_t
= real_t>
classelsa
::
HardThresholding
: public elsa::ProximityOperator<real_t>¶ Class representing the proximity operator of the l0 pseudo-norm.
This class represents the hard thresholding operator, expressed by its apply method through the function i.e.
$ prox(v) = v·1_{\{|v| > t\}}. $- Author
Andi Braimllari - initial code
- Template Parameters
data_t
: data type for the values of the operator, defaulting to real_t
References: http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode93.html
Public Functions
-
HardThresholding
(const DataDescriptor &descriptor)¶ Construct a HardThresholding operator from the given DataDescriptor.
- Parameters
[in] descriptor
: DataDescriptor describing the operator values
-
~HardThresholding
() override = default¶ default destructor
Protected Functions
-
void
applyImpl
(const DataContainer<data_t> &v, geometry::Threshold<data_t> t, DataContainer<data_t> &prox) const override¶ apply the proximity operator of the l0 pseudo-norm to an element in the operator’s domain
- Parameters
[in] v
: input DataContainer[in] t
: input Threshold[out] prox
: output DataContainer
-
auto
cloneImpl
() const -> HardThresholding<data_t>* override¶ implement the polymorphic clone operation
-
auto
isEqual
(const ProximityOperator<data_t> &other) const -> bool override¶ implement the polymorphic comparison operation