15 using namespace shogun;
22 SG_INFO(
"Product kernel created (%p)\n",
this) ;
30 SG_INFO(
"Product kernel deleted (%p).\n",
this);
65 SG_ERROR(
"ProductKernel: Number of features/kernels does not match - bailing out\n");
69 result=k->
init(lf,rf);
78 SG_DEBUG(
"Initializing 0x%p - \"%s\" (skipping init, this is a CUSTOM kernel)\n",
this, k->
get_name());
80 SG_ERROR(
"No kernel matrix was assigned to this Custom kernel\n");
93 SG_INFO(
"ProductKernel: Initialising the following kernel failed\n");
101 if ((lf!=NULL) || (rf!=NULL) || (k!=NULL))
106 SG_ERROR(
"ProductKernel: Number of features/kernels does not match - bailing out\n");
194 SG_INFO(
"BEGIN PRODUCT KERNEL LIST - ");
205 SG_INFO(
"END PRODUCT KERNEL LIST - ");
249 void CProductKernel::init()
271 bool found_derivative =
false;
275 for (
int h = 0; h < temp_kernel.
num_cols; h++)
276 temp_kernel(g,h) = 1.0;
287 found_derivative =
true;
291 temp_kernel(g,h) *= derivative(g,h);
301 temp_kernel(g,h) *= cur_matrix(g,h);
310 if (found_derivative)