numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::regularization::tikhonov< Coeff, Data > Class Template Reference

Class to perform Tikhonov regularization. More...

#include <num_collect/regularization/tikhonov.h>

+ Inheritance diagram for num_collect::regularization::tikhonov< Coeff, Data >:
+ Collaboration diagram for num_collect::regularization::tikhonov< Coeff, Data >:

Public Types

using base_type
 Type of base class.
 
using coeff_type = Coeff
 Type of coefficient matrices.
 
- Public Types inherited from num_collect::regularization::regularized_solver_base< tikhonov< Coeff, Data >, Data >
using data_type
 Type of data.
 
using scalar_type
 Type of scalars.
 

Public Member Functions

 tikhonov ()
 Constructor.
 
void compute (const coeff_type &coeff, const data_type &data)
 Compute internal matrices.
 
auto data_size () const -> index_type
 Get the size of data.
 
auto first_derivative_of_regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the first-order derivative of the Regularization term.
 
auto first_derivative_of_residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the first-order derivative of the squared norm of the residual.
 
auto param_search_region () const -> std::pair< scalar_type, scalar_type >
 Get the default region to search for the optimal regularization parameter.
 
auto regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the regularization term.
 
auto residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the squared norm of the residual.
 
auto second_derivative_of_regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the send-order derivative of the Regularization term.
 
auto second_derivative_of_residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the second-order derivative of the squared norm of the residual.
 
auto singular_values () const -> const typename Eigen::BDCSVD< coeff_type >::SingularValuesType &
 Get the singular values.
 
void solve (const scalar_type &param, data_type &solution) const
 Solve for a regularization parameter.
 
auto sum_of_filter_factor (const scalar_type &param) const -> scalar_type
 Calculate the sum of filter factors.
 
- Public Member Functions inherited from num_collect::regularization::explicit_regularized_solver_base< tikhonov< Coeff, Data >, Data >
auto first_derivative_of_regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the first-order derivative of the Regularization term.
 
auto first_derivative_of_residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the first-order derivative of the squared norm of the residual.
 
auto gcv (const scalar_type &param) const -> scalar_type
 Calculate GCV function.
 
auto l_curve_curvature (const scalar_type &param) const
 Calculate the curvature of L-curve.
 
auto regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the regularization term.
 
auto residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the squared norm of the residual.
 
auto second_derivative_of_regularization_term (const scalar_type &param) const -> scalar_type
 Calculate the send-order derivative of the Regularization term.
 
auto second_derivative_of_residual_norm (const scalar_type &param) const -> scalar_type
 Calculate the second-order derivative of the squared norm of the residual.
 
void solve (const scalar_type &param, data_type &solution) const
 Solve for a regularization parameter.
 
auto sum_of_filter_factor (const scalar_type &param) const -> scalar_type
 Calculate the sum of filter factors.
 
- Public Member Functions inherited from num_collect::regularization::regularized_solver_base< tikhonov< Coeff, Data >, Data >
auto data_size () const -> index_type
 Get the size of data.
 
auto param_search_region () const -> std::pair< scalar_type, scalar_type >
 Get the default region to search for the optimal regularization parameter.
 
void solve (const scalar_type &param, data_type &solution)
 Solve for a regularization parameter.
 
- Public Member Functions inherited from num_collect::logging::logging_mixin
 logging_mixin (log_tag_view tag)
 Constructor.
 
template<typename Child >
void configure_child_algorithm_logger_if_exists (Child &child)
 Configure a logger of a child algorithm if exists.
 
auto logger () const noexcept -> const num_collect::logging::logger &
 Access to the logger.
 
auto logger () noexcept -> num_collect::logging::logger &
 Access to the logger.
 

Private Attributes

scalar_type min_res_ {}
 Minimum residual.
 
data_type rot_data_ {}
 Data in the space of singular values.
 
Eigen::BDCSVD< coeff_typesvd_ {}
 SVD of the coefficient matrix.
 

Additional Inherited Members

- Protected Member Functions inherited from num_collect::regularization::explicit_regularized_solver_base< tikhonov< Coeff, Data >, Data >
 explicit_regularized_solver_base (logging::log_tag_view tag)
 Constructor.
 
- Protected Member Functions inherited from num_collect::regularization::regularized_solver_base< tikhonov< Coeff, Data >, Data >
 regularized_solver_base (logging::log_tag_view tag)
 Constructor.
 
auto derived () const noexcept -> const tikhonov< Coeff, Data > &
 Access derived object.
 
auto derived () noexcept -> tikhonov< Coeff, Data > &
 Access derived object.
 

Detailed Description

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
class num_collect::regularization::tikhonov< Coeff, Data >

Class to perform Tikhonov regularization.

Template Parameters
CoeffType of coefficient matrices.
DataType of data vectors.

Definition at line 47 of file tikhonov.h.

Member Typedef Documentation

◆ base_type

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
using num_collect::regularization::tikhonov< Coeff, Data >::base_type

◆ coeff_type

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
using num_collect::regularization::tikhonov< Coeff, Data >::coeff_type = Coeff

Type of coefficient matrices.

Definition at line 58 of file tikhonov.h.

Constructor & Destructor Documentation

◆ tikhonov()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
num_collect::regularization::tikhonov< Coeff, Data >::tikhonov ( )
inline

Constructor.

Definition at line 67 of file tikhonov.h.

Member Function Documentation

◆ compute()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
void num_collect::regularization::tikhonov< Coeff, Data >::compute ( const coeff_type & coeff,
const data_type & data )
inline

Compute internal matrices.

Parameters
[in]coeffCoefficient matrix.
[in]dataData vector.

Definition at line 75 of file tikhonov.h.

◆ data_size()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::data_size ( ) const -> index_type
inlinenodiscard

Get the size of data.

Returns
Size of data.

Definition at line 211 of file tikhonov.h.

◆ first_derivative_of_regularization_term()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::first_derivative_of_regularization_term ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the first-order derivative of the Regularization term.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 151 of file tikhonov.h.

◆ first_derivative_of_residual_norm()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::first_derivative_of_residual_norm ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the first-order derivative of the squared norm of the residual.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 136 of file tikhonov.h.

◆ param_search_region()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::param_search_region ( ) const -> std::pair<scalar_type, scalar_type>
inlinenodiscard

Get the default region to search for the optimal regularization parameter.

Returns
Pair of minimum and maximum regularization parameters.

Definition at line 214 of file tikhonov.h.

◆ regularization_term()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::regularization_term ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the regularization term.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 122 of file tikhonov.h.

◆ residual_norm()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::residual_norm ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the squared norm of the residual.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 108 of file tikhonov.h.

◆ second_derivative_of_regularization_term()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::second_derivative_of_regularization_term ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the send-order derivative of the Regularization term.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 183 of file tikhonov.h.

◆ second_derivative_of_residual_norm()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::second_derivative_of_residual_norm ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the second-order derivative of the squared norm of the residual.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 166 of file tikhonov.h.

◆ singular_values()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::singular_values ( ) const -> const typename Eigen::BDCSVD<coeff_type>::SingularValuesType&
inlinenodiscard

Get the singular values.

Returns
Singular values.

Definition at line 102 of file tikhonov.h.

◆ solve()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
void num_collect::regularization::tikhonov< Coeff, Data >::solve ( const scalar_type & param,
data_type & solution ) const
inline

Solve for a regularization parameter.

Parameters
[in]paramRegularization parameter.
[out]solutionSolution.

Definition at line 86 of file tikhonov.h.

◆ sum_of_filter_factor()

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
auto num_collect::regularization::tikhonov< Coeff, Data >::sum_of_filter_factor ( const scalar_type & param) const -> scalar_type
inlinenodiscard

Calculate the sum of filter factors.

Parameters
[in]paramRegularization parameter.
Returns
Result.

Definition at line 198 of file tikhonov.h.

Member Data Documentation

◆ min_res_

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
scalar_type num_collect::regularization::tikhonov< Coeff, Data >::min_res_ {}
private

Minimum residual.

Definition at line 231 of file tikhonov.h.

◆ rot_data_

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
data_type num_collect::regularization::tikhonov< Coeff, Data >::rot_data_ {}
private

Data in the space of singular values.

Definition at line 228 of file tikhonov.h.

◆ svd_

template<base::concepts::dense_matrix Coeff, base::concepts::dense_matrix Data>
Eigen::BDCSVD<coeff_type> num_collect::regularization::tikhonov< Coeff, Data >::svd_ {}
private

SVD of the coefficient matrix.

Definition at line 225 of file tikhonov.h.


The documentation for this class was generated from the following file: