NegativeBKTA Class Reference

Balanced version of the NegativeKTA. More...

#include <KTA.h>

Inheritance diagram for NegativeBKTA:
ErrorFunction

List of all members.

Public Member Functions

 NegativeBKTA ()
 Constructor.
 ~NegativeBKTA ()
 Destructor.
double error (Model &model, const Array< double > &input, const Array< double > &target)
 Computes the negative Balanced Kernel Target Alignment between the target and the kernel function output on the input.
double errorDerivative (Model &model, const Array< double > &input, const Array< double > &target, Array< double > &derivative)
 Computes the negative Balanced Kernel Target Alignment between the target and the kernel function output on the input.

Detailed Description

Balanced version of the NegativeKTA.

The Balanced Kernel Target Alignment measure is a variant
of the Kernel Target Alignment. This version of the measure is invariant under the fractions of positive and negative examples, and is currently only valid for binary classification problems.
It is computed as follows:
Let p be the number of positive examples and let n be the number of negative examples. We define an inner product between kernel (Gram) matrices M and N as

\[ //! \langle M, N \rangle := \sum_{i, j} \lambda_{ij} M_{ij} N_{ij} //! \]

with positive coeffitients $ \lambda_{ij} = n/p $ if $ y_i = y_j = +1 $, $ \lambda_{ij} = 1 $ if $ y_i \not= y_j $ and $ \lambda_{ij} = p/n $ if $ y_i = y_j = -1 $.

Then we apply the usual definition of the kernel target alignment

\[ //! \hat A = \frac{\langle yy^T, K \rangle}{\|yy^T\| \cdot \|K\|} //! \]

where the norm $ \| M \| = \sqrt{\langle M, M \rangle} $ is defined according to the inner product defined above.

To my knowledge, the balancing modification has not been
proposed in the literature so far.
Author:
: T. Glasmachers
Date:
: 2006

Definition at line 150 of file KTA.h.


Constructor & Destructor Documentation

NegativeBKTA::NegativeBKTA (  ) 

Constructor.

Definition at line 234 of file KTA.cpp.

NegativeBKTA::~NegativeBKTA (  ) 

Destructor.

Definition at line 238 of file KTA.cpp.


Member Function Documentation

double NegativeBKTA::error ( Model model,
const Array< double > &  input,
const Array< double > &  target 
) [virtual]

Computes the negative Balanced Kernel Target Alignment between the target and the kernel function output on the input.

Implements ErrorFunction.

Definition at line 243 of file KTA.cpp.

References KernelFunction::eval(), C_SVM::get_Cminus(), C_SVM::get_Cplus(), SVM::getKernel(), MetaSVM::getSVM(), i, and C_SVM::is2norm().

double NegativeBKTA::errorDerivative ( Model model,
const Array< double > &  input,
const Array< double > &  target,
Array< double > &  derivative 
) [virtual]

Computes the negative Balanced Kernel Target Alignment between the target and the kernel function output on the input.

The partial derivatives of the negative BKTA w.r.t. the model parameters are returned in the derivative parameter.

Reimplemented from ErrorFunction.

Definition at line 311 of file KTA.cpp.

References KernelFunction::evalDerivative(), C_SVM::get_Cminus(), C_SVM::get_Cplus(), C_SVM::getCRatio(), SVM::getKernel(), Model::getParameterDimension(), MetaSVM::getSVM(), i, and C_SVM::is2norm().


The documentation for this class was generated from the following files: