PLearn 0.1
|
#include <NormalizedDotProductKernel.h>
Public Member Functions | |
NormalizedDotProductKernel (real the_norm=2.0) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual NormalizedDotProductKernel * | deepCopy (CopiesMap &copies) const |
virtual real | evaluate (const Vec &x1, const Vec &x2) const |
** Subclasses must override this method ** | |
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 () |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
recognized option is "norm_to_use" | |
Protected Attributes | |
real | norm_to_use |
Private Types | |
typedef Kernel | inherited |
Definition at line 53 of file NormalizedDotProductKernel.h.
typedef Kernel PLearn::NormalizedDotProductKernel::inherited [private] |
Reimplemented from PLearn::Kernel.
Definition at line 55 of file NormalizedDotProductKernel.h.
PLearn::NormalizedDotProductKernel::NormalizedDotProductKernel | ( | real | the_norm = 2.0 | ) | [inline] |
Definition at line 61 of file NormalizedDotProductKernel.h.
: norm_to_use(the_norm) {}
string PLearn::NormalizedDotProductKernel::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
OptionList & PLearn::NormalizedDotProductKernel::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
RemoteMethodMap & PLearn::NormalizedDotProductKernel::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
Object * PLearn::NormalizedDotProductKernel::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 49 of file NormalizedDotProductKernel.cc.
StaticInitializer NormalizedDotProductKernel::_static_initializer_ & PLearn::NormalizedDotProductKernel::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
string PLearn::NormalizedDotProductKernel::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file NormalizedDotProductKernel.cc.
void PLearn::NormalizedDotProductKernel::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
recognized option is "norm_to_use"
Reimplemented from PLearn::Kernel.
Definition at line 54 of file NormalizedDotProductKernel.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), and norm_to_use.
{ declareOption(ol, "norm_to_use", &NormalizedDotProductKernel::norm_to_use, OptionBase::buildoption, "TODO: Some comments"); inherited::declareOptions(ol); }
static const PPath& PLearn::NormalizedDotProductKernel::declaringFile | ( | ) | [inline, static] |
NormalizedDotProductKernel * PLearn::NormalizedDotProductKernel::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file NormalizedDotProductKernel.cc.
real PLearn::NormalizedDotProductKernel::evaluate | ( | const Vec & | x1, |
const Vec & | x2 | ||
) | const [virtual] |
** Subclasses must override this method **
returns K(x1,x2)
Implements PLearn::Kernel.
Definition at line 51 of file NormalizedDotProductKernel.cc.
References PLearn::dot(), and PLearn::norm().
{ return dot(x1,x2)/(norm(x1,norm_to_use)*norm(x2,norm_to_use)); }
OptionList & PLearn::NormalizedDotProductKernel::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file NormalizedDotProductKernel.cc.
OptionMap & PLearn::NormalizedDotProductKernel::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file NormalizedDotProductKernel.cc.
RemoteMethodMap & PLearn::NormalizedDotProductKernel::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file NormalizedDotProductKernel.cc.
Reimplemented from PLearn::Kernel.
Definition at line 64 of file NormalizedDotProductKernel.h.
real PLearn::NormalizedDotProductKernel::norm_to_use [protected] |
Definition at line 58 of file NormalizedDotProductKernel.h.
Referenced by declareOptions().