QpMcDecomp.h File Reference

Go to the source code of this file.

Classes

class  shark::QpMcDecomp< Matrix >
 Quadratic program solver for multi class SVM problems. More...
 
struct  shark::QpMcDecomp< Matrix >::tVariable
 data structure describing one variable of the problem More...
 
struct  shark::QpMcDecomp< Matrix >::tExample
 data structure describing one training example More...
 

Namespaces

 shark
 AbstractMultiObjectiveOptimizer.
 

Macros

#define ITERATIONS_BETWEEN_SHRINKING   1000
 
#define GRADIENT_UPDATE(r, from, to, mu, q)
 
#define GAIN_SELECTION_BOX(qif)
 
#define GAIN_SELECTION_TRIANGLE(qif)
 

Macro Definition Documentation

§ GAIN_SELECTION_BOX

#define GAIN_SELECTION_BOX (   qif)

Definition at line 82 of file QpMcDecomp.h.

Referenced by shark::QpMcDecomp< Matrix >::selectWorkingSet().

§ GAIN_SELECTION_TRIANGLE

#define GAIN_SELECTION_TRIANGLE (   qif)

Definition at line 115 of file QpMcDecomp.h.

Referenced by shark::QpMcDecomp< Matrix >::selectWorkingSet().

§ GRADIENT_UPDATE

#define GRADIENT_UPDATE (   r,
  from,
  to,
  mu,
 
)
Value:
{ \
std::size_t a, b, p; \
for (a=(from); a<(to); a++) \
{ \
double k = (q)[a]; \
tExample& ex = example[a]; \
typename QpSparseArray<QpFloatType>::Row const& row = M.row(classes * (r) + ex.y); \
QpFloatType def = row.defaultvalue; \
if (def == 0.0) \
{ \
for (b=0; b<row.size; b++) \
{ \
p = row.entry[b].index; \
gradient(ex.var[p]) -= (mu) * row.entry[b].value * k; \
} \
} \
else \
{ \
for (b=0; b<row.size; b++) \
{ \
p = row.entry[b].index; \
gradient(ex.var[p]) -= (mu) * (row.entry[b].value - def) * k; \
} \
double upd = (mu) * def * k; \
for (b=0; b<ex.active; b++) gradient(ex.avar[b]) -= upd; \
} \
} \
}

Definition at line 52 of file QpMcDecomp.h.

Referenced by shark::QpMcDecomp< Matrix >::solve(), and shark::QpMcDecomp< Matrix >::solveSMO().

§ ITERATIONS_BETWEEN_SHRINKING

#define ITERATIONS_BETWEEN_SHRINKING   1000