Special "Gaussian-like" kernel function on tasks. More...
#include <shark/Models/Kernels/MultiTaskKernel.h>
Public Types | |
typedef InputTypeT | InputType |
typedef MultiTaskSample< InputType > | MultiTaskSampleType |
typedef AbstractKernelFunction< InputType > | KernelType |
Public Member Functions | |
GaussianTaskKernel (Data< MultiTaskSampleType > const &data, std::size_t tasks, KernelType &inputkernel, double gamma) | |
Construction of a Gaussian kernel on tasks. More... | |
std::string | name () const |
From INameable: return the class name. More... | |
RealVector | parameterVector () const |
void | setParameterVector (RealVector const &newParameters) |
std::size_t | numberOfParameters () const |
std::size_t | numberOfTasks () const |
double | gamma () const |
Kernel bandwidth parameter. More... | |
double | sigma () const |
Kernel width parameter, equivalent to the bandwidth parameter. More... | |
void | setGamma (double gamma) |
void | setWidth (double sigma) |
Set the kernel width (equivalent to setting the bandwidth). More... | |
void | read (InArchive &ar) |
From ISerializable. More... | |
void | write (OutArchive &ar) const |
From ISerializable. More... | |
Protected Member Functions | |
void | computeMatrix () |
Compute the Gram matrix of the task kernel. More... | |
Protected Attributes | |
Data< MultiTaskSampleType > const & | m_data |
multi-task data More... | |
KernelType * | mpe_inputKernel |
kernel on inputs More... | |
double | m_gamma |
bandwidth of the Gaussian task kernel More... | |
Special "Gaussian-like" kernel function on tasks.
\[ k(t, t') = \exp \left( -\gamma \cdot \left\| \frac{1}{\ell_{t}\ell{t'}} \sum_{i | t_i = t}\sum_{j | t_j = t'} k'(x_i, x_j) \right\|^2 \right) \]
where k' is an arbitrary kernel on inputs.Definition at line 129 of file MultiTaskKernel.h.
typedef InputTypeT GaussianTaskKernel< InputTypeT >::InputType |
Definition at line 134 of file MultiTaskKernel.h.
typedef AbstractKernelFunction<InputType> GaussianTaskKernel< InputTypeT >::KernelType |
Definition at line 136 of file MultiTaskKernel.h.
typedef MultiTaskSample<InputType> GaussianTaskKernel< InputTypeT >::MultiTaskSampleType |
Definition at line 135 of file MultiTaskKernel.h.
|
inline |
Construction of a Gaussian kernel on tasks.
data | unlabeled data from multiple tasks |
tasks | number of tasks in the problem |
inputkernel | kernel on inputs based on which task similarity is defined |
gamma | Gaussian bandwidth parameter (also refer to the member functions setGamma and setSigma). |
Definition at line 144 of file MultiTaskKernel.h.
|
inlineprotected |
Compute the Gram matrix of the task kernel.
Definition at line 236 of file MultiTaskKernel.h.
|
inline |
Kernel bandwidth parameter.
Definition at line 179 of file MultiTaskKernel.h.
|
inline |
From INameable: return the class name.
Definition at line 157 of file MultiTaskKernel.h.
|
inline |
Definition at line 171 of file MultiTaskKernel.h.
|
inline |
Definition at line 175 of file MultiTaskKernel.h.
|
inline |
Definition at line 160 of file MultiTaskKernel.h.
|
inline |
From ISerializable.
Definition at line 205 of file MultiTaskKernel.h.
|
inline |
Definition at line 189 of file MultiTaskKernel.h.
References SHARK_ASSERT.
|
inline |
Definition at line 164 of file MultiTaskKernel.h.
References remora::subrange().
|
inline |
Set the kernel width (equivalent to setting the bandwidth).
The bandwidth gamma and the width sigma are connected: \( gamma = 1 / (2 \cdot sigma^2) \).
Definition at line 198 of file MultiTaskKernel.h.
References SHARK_ASSERT.
|
inline |
Kernel width parameter, equivalent to the bandwidth parameter.
The bandwidth gamma and the width sigma are connected: \( gamma = 1 / (2 \cdot sigma^2) \).
Definition at line 185 of file MultiTaskKernel.h.
|
inline |
From ISerializable.
Definition at line 212 of file MultiTaskKernel.h.
|
protected |
multi-task data
Definition at line 281 of file MultiTaskKernel.h.
|
protected |
bandwidth of the Gaussian task kernel
Definition at line 283 of file MultiTaskKernel.h.
|
protected |
kernel on inputs
Definition at line 282 of file MultiTaskKernel.h.