32 void CSOSVMHelper::init()
63 for (int32_t i = 0; i < N; i++)
72 hinge_losses += hinge_loss_i;
92 for (int32_t i = 0; i < N; i++)
97 loss += result->
delta;
108 if (m_tracker >= m_bufsize)
110 SG_PRINT(
"%s::add_debug_information(): Buffer overflows! No more values will be recorded!\n",
116 m_primal[m_tracker] = primal;
117 m_eff_pass[m_tracker] = eff_pass;
118 m_train_error[m_tracker] = train_error;
122 m_dual[m_tracker] = dual;
123 m_duality_gap[m_tracker] = dgap;
141 return m_duality_gap;
151 return m_train_error;
Base class of the labels used in Structured Output (SO) problems.
static float64_t dual_objective(SGVector< float64_t > w, float64_t b_alpha, float64_t lbda)
SGVector< float64_t > get_primal_values() const
SGVector< float64_t > get_eff_passes() const
static float64_t primal_objective(SGVector< float64_t > w, CStructuredModel *model, float64_t lbda)
SGVector< float64_t > get_train_errors() const
CStructuredLabels * get_labels()
static float64_t average_loss(SGVector< float64_t > w, CStructuredModel *model)
Class SGObject is the base class of all shogun objects.
Class CStructuredModel that represents the application specific model and contains most of the applic...
SGVector< float64_t > get_dual_values() const
all of classes and functions are contained in the shogun namespace
virtual CResultSet * argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training=true)=0
virtual void add_debug_info(float64_t primal, float64_t eff_pass, float64_t train_error, float64_t dual=-1, float64_t dgap=-1)
virtual int32_t get_num_labels() const
SGVector< float64_t > get_duality_gaps() const
void resize_vector(int32_t n)
virtual const char * get_name() const