Special kernel function for multi-task and transfer learning. More...
#include <shark/Models/Kernels/MultiTaskKernel.h>
Inheritance diagram for shark::MultiTaskKernel< InputTypeT >:Public Member Functions | |
| MultiTaskKernel (InputKernelType *inputkernel, DiscreteKernel *taskkernel) | |
| Constructor. | |
| std::string | name () const |
| From INameable: return the class name. | |
Public Member Functions inherited from shark::ProductKernel< MultiTaskSample< InputTypeT > > | |
| ProductKernel () | |
| Default constructor. | |
| ProductKernel (SubKernel *k1, SubKernel *k2) | |
| Constructor for a product of two kernels. | |
| ProductKernel (std::vector< SubKernel * > kernels) | |
| std::string | name () const |
| From INameable: return the class name. | |
| void | addKernel (SubKernel *k) |
| Add one more kernel to the expansion. | |
| RealVector | parameterVector () const |
| Return the parameter vector. | |
| void | setParameterVector (RealVector const &newParameters) |
| Set the parameter vector. | |
| std::size_t | numberOfParameters () const |
| Return the number of parameters. | |
| double | eval (ConstInputReference x1, ConstInputReference x2) const |
| evaluates the kernel function | |
| void | eval (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2, RealMatrix &result) const |
| Evaluates the subset of the KernelGram matrix which is defined by X1(rows) and X2 (columns). | |
| void | eval (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2, RealMatrix &result, State &state) const |
| Evaluates the subset of the KernelGram matrix which is defined by X1(rows) and X2 (columns). | |
| void | read (InArchive &ar) |
| From ISerializable. | |
| void | write (OutArchive &ar) const |
| From ISerializable. | |
Public Member Functions inherited from shark::AbstractKernelFunction< InputTypeT > | |
| AbstractKernelFunction () | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | hasFirstParameterDerivative () const |
| bool | hasFirstInputDerivative () const |
| bool | isNormalized () const |
| bool | supportsVariableInputSize () const |
| virtual boost::shared_ptr< State > | createState () const |
| Creates an internal state of the kernel. | |
| double | operator() (ConstInputReference x1, ConstInputReference x2) const |
| Convenience operator which evaluates the kernel function. | |
| RealMatrix | operator() (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2) const |
| Evaluates the subset of the KernelGram matrix which is defined by X1(rows) and X2 (columns). | |
| virtual void | weightedParameterDerivative (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2, RealMatrix const &coefficients, State const &state, RealVector &gradient) const |
| Computes the gradient of the parameters as a weighted sum over the gradient of all elements of the batch. | |
| virtual void | weightedInputDerivative (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2, RealMatrix const &coefficientsX2, State const &state, BatchInputType &gradient) const |
| Calculates the derivative of the inputs X1 (only x1!). | |
| virtual double | featureDistanceSqr (ConstInputReference x1, ConstInputReference x2) const |
| Computes the squared distance in the kernel induced feature space. | |
| virtual RealMatrix | featureDistanceSqr (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2) const |
| Computes the squared distance in the kernel induced feature space. | |
Public Member Functions inherited from shark::AbstractMetric< InputTypeT > | |
| AbstractMetric () | |
| virtual | ~AbstractMetric () |
| double | featureDistance (ConstInputReference x1, ConstInputReference x2) const |
| Computes the distance in the kernel induced feature space. | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::IParameterizable< VectorType > | |
| virtual | ~IParameterizable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. | |
| void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). | |
| void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Additional Inherited Members | |
Protected Attributes inherited from shark::ProductKernel< MultiTaskSample< InputTypeT > > | |
| std::vector< SubKernel * > | m_kernels |
| vector of sub-kernels | |
| std::size_t | m_numberOfParameters |
| total number of parameters in the product (this is redundant information) | |
Protected Attributes inherited from shark::AbstractKernelFunction< InputTypeT > | |
| Features | m_features |
Special kernel function for multi-task and transfer learning.
Definition at line 297 of file MultiTaskKernel.h.
| typedef AbstractKernelFunction<InputTypeT> shark::MultiTaskKernel< InputTypeT >::InputKernelType |
Definition at line 305 of file MultiTaskKernel.h.
|
inline |
Constructor.
| inputkernel | kernel on inputs |
| taskkernel | kernel on task indices |
Definition at line 310 of file MultiTaskKernel.h.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 318 of file MultiTaskKernel.h.