ANOVA kernel. More...
#include <Kernel.hpp>


Public Member Functions | |
| ANOVAKernel (DenseMatrix< scalar_t > &data, scalar_t h, scalar_t lambda, int p=1) | |
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_t & | data () const |
| DenseM_t & | data () |
| std::vector< int > & | permutation () |
| const std::vector< int > & | permutation () const |
| virtual void | permute () |
ANOVA kernel.
Implements the kernel: \( \sum_{1\leq k_1<...<k_p\leq n}k(x^{k_1},y^{k_1})\times...\times k(x^{k_p},y^{k_p}), with k(x,y)=\exp \left( -\frac{\|x-y\|_2^2}{2 h^2} \right)\), with an extra regularization parameter lambda on the diagonal. The kernel is implemented efficiently due to the recurrence relation in "Support Vector Regression with ANOVA Decomposition Kernels", 1999.
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.
|
inline |
Constructor of the kernel object.