DiSMEC++
dismec::objective Namespace Reference

Classes

class  DenseAndSparseLinearBase
 Base class for implementationa of an objective that combines dense features and sparse features. More...
 
struct  DenseAndSparseMargin
 
class  GenericLinearClassifier
 This is a non-templated, runtime-polymorphic generic implementation of the linear classifier objective. More...
 
struct  GenericMarginClassifier
 A utility class template that, when instatiated with a MarginFunction, produces the corresponding linear classifier loss. More...
 
class  LinearClassifierBase
 Base class for objectives that use a linear classifier. More...
 
class  LinearClassifierImpBase
 Implementation helper for linear classifier derived classes. More...
 
struct  SquaredHingePhi
 
struct  HuberPhi
 
struct  LogisticPhi
 
class  Objective
 Class that models an optimization objective. More...
 
class  PointWiseRegularizer
 Base class for pointwise regularization functions. More...
 
class  Regularized_SquaredHingeSVC
 
struct  SquaredNormConfig
 
struct  HuberConfig
 
struct  ElasticConfig
 
class  SquaredNormRegularizer
 This class implements a squared norm (L2) regularizer. Thus f(x) = 0.5 |x|^2. More...
 
class  HuberRegularizer
 This class implements a huber regularizer. More...
 
class  ElasticNetRegularizer
 

Functions

std::unique_ptr< DenseAndSparseLinearBasemake_sp_dense_squared_hinge (std::shared_ptr< const GenericFeatureMatrix > dense_features, real_t dense_reg_strength, std::shared_ptr< const GenericFeatureMatrix > sparse_features, real_t sparse_reg_strength)
 
std::unique_ptr< GenericLinearClassifiermake_squared_hinge (std::shared_ptr< const GenericFeatureMatrix > X, std::unique_ptr< Objective > regularizer)
 
std::unique_ptr< GenericLinearClassifiermake_logistic_loss (std::shared_ptr< const GenericFeatureMatrix > X, std::unique_ptr< Objective > regularizer)
 
std::unique_ptr< GenericLinearClassifiermake_huber_hinge (std::shared_ptr< const GenericFeatureMatrix > X, std::unique_ptr< Objective > regularizer, real_t epsilon)
 
std::unique_ptr< Objectivemake_regularizer (const SquaredNormConfig &config)
 
std::unique_ptr< Objectivemake_regularizer (const HuberConfig &config)
 
std::unique_ptr< Objectivemake_regularizer (const ElasticConfig &config)
 

Detailed Description

Regularizers are implementations of Objective that depend only on the weight vector, but make no reference to external data. From the Objective interface, this is not visible, since the data is not part of the public interface.

Function Documentation

◆ make_huber_hinge()

std::unique_ptr< GenericLinearClassifier > dismec::objective::make_huber_hinge ( std::shared_ptr< const GenericFeatureMatrix X,
std::unique_ptr< Objective regularizer,
real_t  epsilon 
)

Definition at line 185 of file generic_linear.cpp.

Referenced by dismec::make_loss().

◆ make_logistic_loss()

std::unique_ptr< GenericLinearClassifier > dismec::objective::make_logistic_loss ( std::shared_ptr< const GenericFeatureMatrix X,
std::unique_ptr< Objective regularizer 
)

Definition at line 180 of file generic_linear.cpp.

Referenced by dismec::make_loss().

◆ make_regularizer() [1/3]

◆ make_regularizer() [2/3]

std::unique_ptr< Objective > dismec::objective::make_regularizer ( const HuberConfig config)

◆ make_regularizer() [3/3]

◆ make_sp_dense_squared_hinge()

std::unique_ptr< DenseAndSparseLinearBase > dismec::objective::make_sp_dense_squared_hinge ( std::shared_ptr< const GenericFeatureMatrix dense_features,
real_t  dense_reg_strength,
std::shared_ptr< const GenericFeatureMatrix sparse_features,
real_t  sparse_reg_strength 
)

Definition at line 247 of file dense_and_sparse.cpp.

Referenced by dismec::CascadeTraining::make_objective().

◆ make_squared_hinge()

std::unique_ptr< GenericLinearClassifier > dismec::objective::make_squared_hinge ( std::shared_ptr< const GenericFeatureMatrix X,
std::unique_ptr< Objective regularizer 
)

Definition at line 175 of file generic_linear.cpp.

Referenced by dismec::make_loss(), and TEST_CASE().