HDIM  1.0.0
Packages for High Dimensional Linear Regression
hdim::internal::AbstractSolver< T > Class Template Referenceabstract

Abstract base class for all iterative solvers. More...

#include <abstractsolver.hpp>

Inheritance diagram for hdim::internal::AbstractSolver< T >:

Public Member Functions

virtual Eigen::Matrix< T, Eigen::Dynamic, 1 > operator() (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Y, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Beta_0, T lambda, unsigned int num_iterations)=0
 Run the AbstractSolver for a fixed number of steps, specified by num_iterations. More...
 
virtual Eigen::Matrix< T, Eigen::Dynamic, 1 > operator() (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Y, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Beta_0, T lambda, T duality_gap_target)=0
 Run the Sub-Gradient Descent algorithm until the duality gap is below the threshold specified by duality_gap_target. More...
 

Protected Member Functions

virtual Eigen::Matrix< T, Eigen::Dynamic, 1 > update_rule (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Y, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &Beta_0, T lambda)=0
 

Detailed Description

template<typename T>
class hdim::internal::AbstractSolver< T >

Abstract base class for all iterative solvers.

This class supports two types of convergence criteria – iterative and duality gap.

Definition at line 32 of file abstractsolver.hpp.

Member Function Documentation

template<typename T >
virtual Eigen::Matrix< T, Eigen::Dynamic, 1 > hdim::internal::AbstractSolver< T >::operator() ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  X,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  Y,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  Beta_0,
lambda,
unsigned int  num_iterations 
)
pure virtual

Run the AbstractSolver for a fixed number of steps, specified by num_iterations.

Parameters
XAn n x p design matrix.
YA 1 x n vector of predictors.
Beta_0A 1 x n vector of starting parameters.
lambdaCurrent grid element.
num_iterationsThe number of times the algorithm should iterate.
Returns
A 1 x n vector of results from the algorithm.

Implemented in hdim::CoordinateDescentWithScreen< T >, hdim::internal::ScreeningSolver< T >, and hdim::internal::Solver< T >.

template<typename T >
virtual Eigen::Matrix< T, Eigen::Dynamic, 1 > hdim::internal::AbstractSolver< T >::operator() ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &  X,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  Y,
const Eigen::Matrix< T, Eigen::Dynamic, 1 > &  Beta_0,
lambda,
duality_gap_target 
)
pure virtual

Run the Sub-Gradient Descent algorithm until the duality gap is below the threshold specified by duality_gap_target.

Parameters
XAn n x p design matrix.
YA 1 x n vector of predictors.
Beta_0A 1 x n vector of starting parameters.
lambdaCurrent grid element.
duality_gap_targetThe algorithm will iterate until the compute duality gap is below duality_gap_target. Note care should be exercised, as the algorithm can iterate ad infinitum.
Returns
A 1 x n vector of results from the algorithm.

Implemented in hdim::internal::ScreeningSolver< T >, hdim::internal::Solver< T >, and hdim::CoordinateDescentWithScreen< T >.