slope 0.29.0
Loading...
Searching...
No Matches
slope::Hybrid Class Reference

Hybrid CD-PGD solver for SLOPE. More...

#include <hybrid.h>

Inheritance diagram for slope::Hybrid:
Collaboration diagram for slope::Hybrid:

Public Member Functions

 Hybrid (JitNormalization jit_normalization, bool intercept, bool update_clusters, int cd_iterations)
 Constructs Hybrid solver for SLOPE optimization.
 
void run (Eigen::VectorXd &beta0, Eigen::VectorXd &beta, Eigen::MatrixXd &eta, const Eigen::ArrayXd &lambda, const std::unique_ptr< Loss > &loss, const SortedL1Norm &penalty, const Eigen::VectorXd &gradient, const std::vector< int > &working_set, const Eigen::MatrixXd &x, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const Eigen::MatrixXd &y) override
 Pure virtual function defining the solver's optimization routine.
 
void run (Eigen::VectorXd &beta0, Eigen::VectorXd &beta, Eigen::MatrixXd &eta, const Eigen::ArrayXd &lambda, const std::unique_ptr< Loss > &loss, const SortedL1Norm &penalty, const Eigen::VectorXd &gradient, const std::vector< int > &working_set, const Eigen::SparseMatrix< double > &x, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const Eigen::MatrixXd &y) override
 Pure virtual function defining the solver's optimization routine.
 
- Public Member Functions inherited from slope::SolverBase
 SolverBase (JitNormalization jit_normalization, bool intercept)
 Constructs a base solver for SLOPE optimization.
 
virtual ~SolverBase ()=default
 Default desstructor.
 

Additional Inherited Members

- Protected Attributes inherited from slope::SolverBase
JitNormalization jit_normalization
 JIT feature normalization strategy.
 
bool intercept
 If true, fits intercept term.
 

Detailed Description

Hybrid CD-PGD solver for SLOPE.

This solver alternates between coordinate descent (CD) and proximal gradient descent (PGD) steps to solve the SLOPE optimization problem. Because the SLOPE problem is non-separable, CD steps do not work out-of-the-box. In particular, they cannot be used to split he clusters (or would need to be augmented with additional steps). Instead, we use a hybrid method:

  • PGD: Splits (or merges) clusters
  • CD: Coordinate descent over the clusters, with good performance but can only merge, not split, clusters. cases

The switching between methods is controlled by the cd_iterations parameter, which determines how often PGD steps are taken versus CD steps.

Definition at line 35 of file hybrid.h.

Constructor & Destructor Documentation

◆ Hybrid()

slope::Hybrid::Hybrid ( JitNormalization  jit_normalization,
bool  intercept,
bool  update_clusters,
int  cd_iterations 
)
inline

Constructs Hybrid solver for SLOPE optimization.

Parameters
jit_normalizationFeature normalization strategy
interceptIf true, fits intercept term
update_clustersIf true, updates clusters during optimization
cd_iterationsFrequency of proximal gradient descent updates

Definition at line 45 of file hybrid.h.

Member Function Documentation

◆ run() [1/2]

void slope::Hybrid::run ( Eigen::VectorXd &  beta0,
Eigen::VectorXd &  beta,
Eigen::MatrixXd &  eta,
const Eigen::ArrayXd &  lambda,
const std::unique_ptr< Loss > &  loss,
const SortedL1Norm penalty,
const Eigen::VectorXd &  gradient,
const std::vector< int > &  working_set,
const Eigen::MatrixXd &  x,
const Eigen::VectorXd &  x_centers,
const Eigen::VectorXd &  x_scales,
const Eigen::MatrixXd &  y 
)
overridevirtual

Pure virtual function defining the solver's optimization routine.

Parameters
beta0Intercept terms for each response
betaCoefficients (size p x m)
etaLinear predictor matrix (n samples x m responses)
lambdaVector of regularization parameters
lossPointer to loss function object
penaltySorted L1 norm object for proximal operations
gradientGradient matrix for loss function
working_setVector of indices for active predictors
xInput feature matrix (n samples x p predictors)
x_centersVector of feature means for centering
x_scalesVector of feature scales for normalization
yResponse matrix (n samples x m responses)

Implements slope::SolverBase.

Definition at line 17 of file hybrid.cpp.

◆ run() [2/2]

void slope::Hybrid::run ( Eigen::VectorXd &  beta0,
Eigen::VectorXd &  beta,
Eigen::MatrixXd &  eta,
const Eigen::ArrayXd &  lambda,
const std::unique_ptr< Loss > &  loss,
const SortedL1Norm penalty,
const Eigen::VectorXd &  gradient,
const std::vector< int > &  working_set,
const Eigen::SparseMatrix< double > &  x,
const Eigen::VectorXd &  x_centers,
const Eigen::VectorXd &  x_scales,
const Eigen::MatrixXd &  y 
)
overridevirtual

Pure virtual function defining the solver's optimization routine.

Parameters
beta0Intercept terms for each response
betaCoefficients (size p x m)
etaLinear predictor matrix (n samples x m responses)
lambdaVector of regularization parameters
lossPointer to loss function object
penaltySorted L1 norm object for proximal operations
gradientGradient matrix for loss function
working_setVector of indices for active predictors
xInput feature matrix (n samples x p predictors)
x_centersVector of feature means for centering
x_scalesVector of feature scales for normalization
yResponse matrix (n samples x m responses)

Implements slope::SolverBase.

Definition at line 46 of file hybrid.cpp.


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