shark::ProjectBudgetMaintenanceStrategy< RealVector > Class Template Reference

Budget maintenance strategy that projects a vector. More...

#include <shark/Algorithms/Trainers/Budgeted/ProjectBudgetMaintenanceStrategy.h>

+ Inheritance diagram for shark::ProjectBudgetMaintenanceStrategy< RealVector >:

Public Member Functions

 ProjectBudgetMaintenanceStrategy ()
 constructor. More...
 
virtual void addToModel (ModelType &model, InputType const &alpha, ElementType const &supportVector)
 
std::string name () const
 class name More...
 
- Public Member Functions inherited from shark::AbstractBudgetMaintenanceStrategy< RealVector >
 AbstractBudgetMaintenanceStrategy ()
 
virtual void addToModel (ModelType &model, RealVector const &alpha, ElementType const &supportVector)=0
 
std::string name () const
 return the class name More...
 

Additional Inherited Members

- Public Types inherited from shark::AbstractBudgetMaintenanceStrategy< RealVector >
typedef KernelExpansion< RealVector > ModelType
 
typedef LabeledData< RealVector, unsigned int > DataType
 
typedef DataType::element_type ElementType
 
- Static Public Member Functions inherited from shark::AbstractBudgetMaintenanceStrategy< RealVector >
static void findSmallestVector (ModelType const &model, size_t &minIndex, double &minAlpha)
 

Detailed Description

template<>
class shark::ProjectBudgetMaintenanceStrategy< RealVector >

Budget maintenance strategy that projects a vector.

This is an specialization of the project budget maintenance strategy
that handles simple real-valued vectors. This is a nearly 1:1 adoption of the strategy presented in Wang, Cramer and Vucetic.

Definition at line 104 of file ProjectBudgetMaintenanceStrategy.h.

Constructor & Destructor Documentation

◆ ProjectBudgetMaintenanceStrategy()

constructor.

Definition at line 113 of file ProjectBudgetMaintenanceStrategy.h.

Member Function Documentation

◆ addToModel()

virtual void shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel ( ModelType model,
InputType const &  alpha,
ElementType const &  supportVector 
)
inlinevirtual

add a vector to the model. this will add the given vector to the model and merge the budget so that afterwards the budget size is kept the same. If the budget has a free entry anyway, no merging will be performed, but instead the given vector is simply added to the budget.

Parameters
[in,out]modelthe model the strategy will work with
[in]alphaalphas for the new budget vector
[in]supportVectorthe vector to add to the model by applying the maintenance strategy

Definition at line 127 of file ProjectBudgetMaintenanceStrategy.h.

References shark::KernelExpansion< InputType >::basis(), shark::Data< Type >::element(), and shark::Data< Type >::numberOfElements().

◆ name()

std::string shark::ProjectBudgetMaintenanceStrategy< RealVector >::name ( ) const
inline

class name

Definition at line 221 of file ProjectBudgetMaintenanceStrategy.h.


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