TikhonovProblem.h 3.26 KB
Newer Older
1
2
3
4
5
6
7
#pragma once

#include "WLSProblem.h"

namespace elsa
{
    /**
8
     * @brief Class representing a Tikhonov regularized weighted least squares problem
9
     *
10
     * @author Nikola Dinev
11
     *
12
     * @tparam data_t data type for the domain and range of the problem, defaulting to real_t
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
     *
     * This class represents a Tikhonov regularized weighted least squares problem.
     * Some common examples are:
     * - \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| x \|_2^2 \f$
     * - \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| x - x^* \|_2^2 \f$
     * - \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| Lx \|_2^2 \f$
     * - \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| L(x - x^*) \|_2^2 \f$,
     * where \f$ A \f$ is a linear operator and \f$ b \f$ and \f$ x^* \f$ are data vectors,
     * \f$ \lambda \f$ is the regularization weight, and \f$ L \f$ is a discretized differential
     * operator.
     *
     * This class supports a wider range of problems - any problem of the form
     * \f$ \argmin_x \frac{1}{2} \| Ax - b \|_{W,2}^2 + \sum_{i=1}^n \lambda_i \| B_ix - x^*_i
     * \|_{V_i,2}^2 \f$ is considered a Tikhonov problem. Here \f$ A \f$ and \f$ B_i \f$ are linear
     * operators, \f$ b \f$ and \f$ x^*_i \f$ are data vectors, \f$ \lambda_i \f$ are the
     * regularization weights, and \f$ W \f$ and \f$ V_i \f$ are scaling operators.
     */
    template <typename data_t = real_t>
    class TikhonovProblem : public Problem<data_t>
    {
    public:
34
35
36
37
38
39
40
41
42
43
44
        /**
         * @brief Construct a Tikhonov problem of the form
         * \f$ \argmin_x \frac{1}{2} \| Ax - b \|_2^2 + \lambda \| x \|_2^2 \f$
         *
         * @param[in] A a linear operator
         * @param[in] b a data vector
         * @param[in] lambda regularization weight
         */
        TikhonovProblem(const LinearOperator<data_t>& A, const DataContainer<data_t> b,
                        real_t lambda = 0.5f);

45
        /**
46
         * @brief Constructor for a Tikhonov problem
47
         *
48
49
         * @param[in] wlsProblem a wls problem specifying the data term and the initial solution
         * @param[in] regTerms the regularization terms, all should be of type L2NormPow2 or
50
51
52
53
54
55
         * WeightedL2NormPow2
         */
        TikhonovProblem(const WLSProblem<data_t>& wlsProblem,
                        const std::vector<RegularizationTerm<data_t>>& regTerms);

        /**
56
         * @brief Constructor for a Tikhonov problem
57
         *
58
59
         * @param[in] wlsProblem a wls problem specifying the data term and the initial solution
         * @param[in] regTerm the regularization term, should be of type L2NormPow2 or
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
         * WeightedL2NormPow2
         */
        TikhonovProblem(const WLSProblem<data_t>& wlsProblem,
                        const RegularizationTerm<data_t>& regTerm);

        /// default destructor
        ~TikhonovProblem() override = default;

    protected:
        /// default copy constructor, hidden from non-derived classes to prevent potential slicing
        TikhonovProblem(const TikhonovProblem<data_t>&) = default;

        /// implement the polymorphic clone operation
        TikhonovProblem<data_t>* cloneImpl() const override;

    private:
        /// lift from base class
        using Problem<data_t>::_regTerms;
    };
} // namespace elsa