11 #include <shogun/lib/external/libqp.h>
54 for (i=0; i<n_tr; i++)
59 for (j=i+1; j<n_tr; j++)
67 for (i=0; i<n_tr; i++)
70 for (j=0; j<n_te; j++)
77 for (i=0; i<n_tr; i++) a[i] = 1.0;
81 for (i=0; i<n_tr; i++)
86 for (i=0; i<n_tr; i++)
89 libqp_state_T result =
90 libqp_gsmo_solver(&
kmm_get_col,diag_K,kappa,a,1.0,LB,UB,weights,n_tr,1000,1e-9,NULL);
92 SG_DEBUG(
"libqp exitflag=%d, %d iterations passed, primal objective=%f\n",
93 result.exitflag,result.nIter,result.QP);
SGVector< index_t > m_training_indices
static const float64_t * kmm_get_col(uint32_t i)
float64_t kernel(int32_t idx_a, int32_t idx_b)
SGVector< float64_t > compute_weights()
void set_kernel(CKernel *kernel)
Class SGObject is the base class of all shogun objects.
void set_training_indices(SGVector< index_t > training_indices)
SGVector< index_t > m_test_indices
void set_test_indices(SGVector< index_t > test_indices)
all of classes and functions are contained in the shogun namespace