Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

Impala::Core::Training::MpoChi2Kernel::MpoChi2Kernel ( const std::vector< double > &  weights,
const std::vector< double > &  averages 
) [inline]

Definition at line 45 of file KernelFunctions.h.

References mNormalisation, and mWeights.

00047     {
00048         int length = weights.size();
00049         mNormalisation = 0;
00050         int i;
00051         for(i=0 ; i<length ; ++i)
00052             mNormalisation += weights[i];
00053         mNormalisation = 1.0 / mNormalisation;
00054 
00055         mWeights.resize(length);
00056         for(i=0 ; i<length ; ++i)
00057             mWeights[i] = -1 * weights[i] / averages[i];
00058     }


Generated on Fri Mar 19 11:23:42 2010 for ImpalaSrc by  doxygen 1.5.1