strumpack::kernel::GaussKernel< scalar_t > Class Template Reference

Gaussian or radial basis function kernel. More...

#include <Kernel.hpp>

Inheritance diagram for strumpack::kernel::GaussKernel< scalar_t >:
Collaboration diagram for strumpack::kernel::GaussKernel< scalar_t >:

Public Member Functions

 GaussKernel (DenseMatrix< scalar_t > &data, scalar_t h, scalar_t lambda)
 
- Public Member Functions inherited from strumpack::kernel::Kernel< scalar_t >
 Kernel (DenseM_t &data, scalar_t lambda)
 
virtual ~Kernel ()=default
 
std::size_t n () const
 
std::size_t d () const
 
virtual scalar_t eval (std::size_t i, std::size_t j) const
 
void operator() (const std::vector< std::size_t > &I, const std::vector< std::size_t > &J, DenseMatrix< real_t > &B) const
 
void operator() (const std::vector< std::size_t > &I, const std::vector< std::size_t > &J, DenseMatrix< std::complex< real_t >> &B) const
 
DenseM_t fit_HSS (std::vector< scalar_t > &labels, const HSS::HSSOptions< scalar_t > &opts)
 
std::vector< scalar_t > predict (const DenseM_t &test, const DenseM_t &weights) const
 
DistM_t fit_HSS (const BLACSGrid &grid, std::vector< scalar_t > &labels, const HSS::HSSOptions< scalar_t > &opts)
 
std::vector< scalar_t > predict (const DenseM_t &test, const DistM_t &weights) const
 
DenseM_t fit_HODLR (const MPIComm &c, std::vector< scalar_t > &labels, const HODLR::HODLROptions< scalar_t > &opts)
 
const DenseM_tdata () const
 
DenseM_tdata ()
 
std::vector< int > & permutation ()
 
const std::vector< int > & permutation () const
 
virtual void permute ()
 

Detailed Description

template<typename scalar_t>
class strumpack::kernel::GaussKernel< scalar_t >

Gaussian or radial basis function kernel.

Implements the kernel: \(\exp \left( -\frac{\|x-y\|_2^2}{2 h^2} \right)\), with an extra regularization parameter lambda on the diagonal.

This is a subclass of Kernel. It only implements the (protected) eval_kernel_function routine, the rest of the functionality is inherited. To create your own kernel, simply copy this class, rename and change the eval_kernel_function implementation.

See also
Kernel, LaplaceKernel

Constructor & Destructor Documentation

◆ GaussKernel()

template<typename scalar_t >
strumpack::kernel::GaussKernel< scalar_t >::GaussKernel ( DenseMatrix< scalar_t > &  data,
scalar_t  h,
scalar_t  lambda 
)
inline

Constructor of the kernel object.

Parameters
dataData defining the kernel matrix. data.rows() is the number of features, and data.cols() is the number of data points, ie, the dimension of the kernel matrix.
hKernel width
lambdaRegularization parameter, added to the diagonal

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