#include <SourceKernel.h>
Inheritance diagram for PLearn::SourceKernel:
Public Member Functions | |
SourceKernel () | |
Default constructor. | |
virtual void | build () |
Simply calls inherited::build() then build_(). | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
PLEARN_DECLARE_OBJECT (SourceKernel) | |
virtual real | evaluate (const Vec &x1, const Vec &x2) const |
Compute K(x1,x2). | |
virtual void | addDataForKernelMatrix (const Vec &newRow) |
Overridden to forward to source_kernel. | |
virtual void | computeGramMatrix (Mat K) const |
Call evaluate_i_j to fill each of the entries (i,j) of symmetric matrix K. | |
virtual real | evaluate_i_j (int i, int j) const |
returns evaluate(data(i),data(j)) | |
virtual real | evaluate_i_x (int i, const Vec &x, real squared_norm_of_x=-1) const |
virtual real | evaluate_x_i (const Vec &x, int i, real squared_norm_of_x=-1) const |
returns evaluate(x,data(i)) [default version calls evaluate_i_x if kernel is_symmetric] | |
virtual void | setDataForKernelMatrix (VMat the_data) |
** Subclasses may overload these methods to provide efficient kernel matrix access ** | |
virtual void | setParameters (Vec paramvec) |
default version produces an error | |
virtual Vec | getParameters () const |
default version returns an empty Vec | |
Public Attributes | |
Ker | source_kernel |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Types | |
typedef Kernel | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 57 of file SourceKernel.h. |
|
Default constructor.
Definition at line 51 of file SourceKernel.cc. |
|
Overridden to forward to source_kernel.
Reimplemented from PLearn::Kernel. Definition at line 103 of file SourceKernel.cc. References source_kernel, and PLearn::Vec. |
|
Simply calls inherited::build() then build_().
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 77 of file SourceKernel.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 86 of file SourceKernel.cc. References source_kernel. Referenced by build(). |
|
Call evaluate_i_j to fill each of the entries (i,j) of symmetric matrix K.
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 113 of file SourceKernel.cc. References PLearn::Mat, and source_kernel. |
|
Declares this class' options.
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 65 of file SourceKernel.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Compute K(x1,x2).
Implements PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 120 of file SourceKernel.cc. References source_kernel. |
|
returns evaluate(data(i),data(j))
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 127 of file SourceKernel.cc. References source_kernel. |
|
returns evaluate(data(i),x) [squared_norm_of_x is just a hint that may allow to speed up computation if it is already known, but it's optional] Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 134 of file SourceKernel.cc. References source_kernel, and x. |
|
returns evaluate(x,data(i)) [default version calls evaluate_i_x if kernel is_symmetric]
Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 141 of file SourceKernel.cc. References source_kernel, and x. |
|
default version returns an empty Vec
Reimplemented from PLearn::Kernel. Definition at line 148 of file SourceKernel.cc. References source_kernel. |
|
Transforms a shallow copy into a deep copy.
Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 155 of file SourceKernel.cc. References PLearn::deepCopyField(), and source_kernel. |
|
|
|
** Subclasses may overload these methods to provide efficient kernel matrix access ** This method sets the data VMat that will be used to define the kernel matrix. It may precompute values from this that may later accelerate the evaluation of a kernel matrix element Reimplemented from PLearn::Kernel. Reimplemented in PLearn::AdditiveNormalizationKernel, and PLearn::DivisiveNormalizationKernel. Definition at line 164 of file SourceKernel.cc. References source_kernel. |
|
default version produces an error
Reimplemented from PLearn::Kernel. Definition at line 172 of file SourceKernel.cc. References source_kernel. |
|
Definition at line 71 of file SourceKernel.h. Referenced by addDataForKernelMatrix(), build_(), computeGramMatrix(), evaluate(), evaluate_i_j(), evaluate_i_x(), evaluate_x_i(), getParameters(), makeDeepCopyFromShallowCopy(), setDataForKernelMatrix(), and setParameters(). |