PLearn 0.1
|
#include <ManifoldParzenKernel.h>
Public Member Functions | |
ManifoldParzenKernel () | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual ManifoldParzenKernel * | deepCopy (CopiesMap &copies) const |
virtual real | evaluate (const Vec &x1, const Vec &x2) const |
** Subclasses must override this method ** | |
virtual real | evaluate_i_j (int i, int j) const |
returns evaluate(data(i),data(j)) | |
virtual void | setDataForKernelMatrix (VMat the_data) |
** Subclasses may override these methods to provide efficient kernel matrix access ** | |
virtual void | addDataForKernelMatrix (const Vec &newRow) |
This method is meant to be used any time the data matrix is appended a new row by an outer instance (e.g. | |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
real | scale |
Scale factor on the eigen values. | |
PP< ManifoldParzen2 > | mp |
ManifoldParzen2 distribution. | |
bool | train_mp |
Indication that the ManifoldParzen distribution should be trained. | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declare options (data fields) for the class. | |
Private Types | |
typedef Kernel | inherited |
Kernel that uses the evaluate method of Manifold Parzen.
Definition at line 56 of file ManifoldParzenKernel.h.
typedef Kernel PLearn::ManifoldParzenKernel::inherited [private] |
Reimplemented from PLearn::Kernel.
Definition at line 58 of file ManifoldParzenKernel.h.
PLearn::ManifoldParzenKernel::ManifoldParzenKernel | ( | ) | [inline] |
string PLearn::ManifoldParzenKernel::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
OptionList & PLearn::ManifoldParzenKernel::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
RemoteMethodMap & PLearn::ManifoldParzenKernel::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
Object * PLearn::ManifoldParzenKernel::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 51 of file ManifoldParzenKernel.cc.
StaticInitializer ManifoldParzenKernel::_static_initializer_ & PLearn::ManifoldParzenKernel::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
void PLearn::ManifoldParzenKernel::addDataForKernelMatrix | ( | const Vec & | newRow | ) | [virtual] |
This method is meant to be used any time the data matrix is appended a new row by an outer instance (e.g.
SequentialKernel). Through this method, the kernel must update any data dependent internal structure. The internal structures should have consistent length with the data matrix, assuming a sequential growing of the vmat.
Reimplemented from PLearn::Kernel.
Definition at line 102 of file ManifoldParzenKernel.cc.
References PLERROR.
{ PLERROR("ManifoldParzenKernel::addDataForKernelMatrix: this method is currently not supported."); }
string PLearn::ManifoldParzenKernel::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file ManifoldParzenKernel.cc.
void PLearn::ManifoldParzenKernel::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declare options (data fields) for the class.
Redefine this in subclasses: call declareOption
(...) for each option, and then call inherited::declareOptions(options)
. Please call the inherited
method AT THE END to get the options listed in a consistent order (from most recently defined to least recently defined).
static void MyDerivedClass::declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "The size of the input; it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "The learned model weights"); inherited::declareOptions(ol); }
ol | List of options that is progressively being constructed for the current class. |
Reimplemented from PLearn::Kernel.
Definition at line 75 of file ManifoldParzenKernel.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), mp, scale, and train_mp.
{ declareOption(ol, "scale", &ManifoldParzenKernel::scale, OptionBase::buildoption, "The scale factor of the eigen values"); declareOption(ol, "mp", &ManifoldParzenKernel::mp, OptionBase::buildoption, "Manifold Parzen distribution"); declareOption(ol, "train_mp", &ManifoldParzenKernel::train_mp, OptionBase::buildoption, "Indication that the ManifoldParzen distribution should be trained"); inherited::declareOptions(ol); }
static const PPath& PLearn::ManifoldParzenKernel::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Kernel.
Definition at line 73 of file ManifoldParzenKernel.h.
: static void declareOptions(OptionList& ol);
ManifoldParzenKernel * PLearn::ManifoldParzenKernel::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Kernel.
Definition at line 51 of file ManifoldParzenKernel.cc.
** Subclasses must override this method **
returns K(x1,x2)
Implements PLearn::Kernel.
Definition at line 53 of file ManifoldParzenKernel.cc.
returns evaluate(data(i),data(j))
Reimplemented from PLearn::Kernel.
Definition at line 64 of file ManifoldParzenKernel.cc.
OptionList & PLearn::ManifoldParzenKernel::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file ManifoldParzenKernel.cc.
OptionMap & PLearn::ManifoldParzenKernel::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file ManifoldParzenKernel.cc.
RemoteMethodMap & PLearn::ManifoldParzenKernel::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file ManifoldParzenKernel.cc.
void PLearn::ManifoldParzenKernel::setDataForKernelMatrix | ( | VMat | the_data | ) | [virtual] |
** Subclasses may override 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.
Definition at line 86 of file ManifoldParzenKernel.cc.
References PLWARNING.
{ inherited::setDataForKernelMatrix(the_data); if(train_mp && data) { mp->setTrainingSet(data); PP<VecStatsCollector> stats = new VecStatsCollector(); mp->setTrainStatsCollector(stats); mp->train(); stats->finalize(); } if(!train_mp && data) PLWARNING("ManifoldParzenKernel::setDataForKernelMatrix: data of kernel is possibly different from data of ManifoldParzen distribution."); }
Reimplemented from PLearn::Kernel.
Definition at line 73 of file ManifoldParzenKernel.h.
ManifoldParzen2 distribution.
Definition at line 65 of file ManifoldParzenKernel.h.
Referenced by declareOptions().
Scale factor on the eigen values.
Definition at line 62 of file ManifoldParzenKernel.h.
Referenced by declareOptions().
Indication that the ManifoldParzen distribution should be trained.
Definition at line 68 of file ManifoldParzenKernel.h.
Referenced by declareOptions().