mlpack
Public Member Functions | List of all members
mlpack::kernel::CauchyKernel Class Reference

The Cauchy kernel. More...

#include <cauchy_kernel.hpp>

Public Member Functions

 CauchyKernel (double bandwidth=1.0)
 Construct the Cauchy kernel; by default, the bandwidth is 1.0.
 
template<typename VecTypeA , typename VecTypeB >
double Evaluate (const VecTypeA &a, const VecTypeB &b)
 Evaluation of the Cauchy kernel. More...
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the kernel.
 

Detailed Description

The Cauchy kernel.

Given two vector \( x \), \( y \), and a bandwidth \( \sigma \) (set in the constructor),

\[ K(x, y) = \frac{1}{1 + (\frac{|| x - y ||}{\sigma})^2}. \]

For more details, see the following published paper:

@inproceedings{Basak2008,
title={A least square kernel machine with box constraints},
author={Basak, Jayanta},
booktitle={Pattern Recognition, 2008. ICPR 2008. 19th International
Conference on},
pages={1--4},
year={2008},
organization={IEEE}
}

Member Function Documentation

◆ Evaluate()

template<typename VecTypeA , typename VecTypeB >
double mlpack::kernel::CauchyKernel::Evaluate ( const VecTypeA &  a,
const VecTypeB &  b 
)
inline

Evaluation of the Cauchy kernel.

This could be generalized to use any distance metric, not the Euclidean distance, but for now, the Euclidean distance is used.

Template Parameters
VecTypeAType of first vector (arma::vec, arma::sp_vec).
VecTypeBType of second vector (arma::vec, arma::sp_vec).
Parameters
aFirst vector.
bSecond vector.
Returns
K(a, b).

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