CauchyKernel Class Reference

The Cauchy kernel. More...

Public Member Functions

 CauchyKernel (double bandwidth=1.0)
 Construct the Cauchy kernel; by default, the bandwidth is 1.0. More...

 
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. More...

 

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}
}

Definition at line 44 of file cauchy_kernel.hpp.

Constructor & Destructor Documentation

◆ CauchyKernel()

CauchyKernel ( double  bandwidth = 1.0)
inline

Construct the Cauchy kernel; by default, the bandwidth is 1.0.

Definition at line 50 of file cauchy_kernel.hpp.

Member Function Documentation

◆ Evaluate()

double 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).

Definition at line 65 of file cauchy_kernel.hpp.

References LMetric< TPower, TTakeRoot >::Evaluate().

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the kernel.

Definition at line 75 of file cauchy_kernel.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/core/kernels/cauchy_kernel.hpp