17 using namespace shogun;
44 SG_ERROR(
"LatentModel is not set!\n");
54 ASSERT(latent_model != NULL);
68 SG_ERROR(
"LatentModel is not set!\n");
77 float64_t decrement = 0.0, primal_obj = 0.0, prev_po = 0.0;
84 while ((iter < 2)||(!stop&&(iter <
m_max_iter)))
88 SG_DEBUG(
"Do the inner loop of CCCP: optimize for w for fixed h*\n");
92 decrement = prev_po - primal_obj;
94 SG_DEBUG(
"decrement: %f\n", decrement);
95 SG_DEBUG(
"primal objective: %f\n", primal_obj);
98 stop = (inner_eps < (0.5*
m_C*m_epsilon+1E-8)) && (decrement <
m_C*
m_epsilon);
100 inner_eps = -decrement*0.01;
102 SG_DEBUG(
"inner epsilon: %f\n", inner_eps);
105 SG_DEBUG(
"Find and set h_i = argmax_h (w, psi(x_i,h))\n");
108 SG_DEBUG(
"Recalculating PSI (x,h) with the new h variables\n");
118 void CLinearLatentMachine::init()