PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Protected Attributes | Private Types
PLearn::ScaledGeneralizedDistanceRBFKernel Class Reference

returns exp(-(sum_i phi_i*[abs(x1_i^a - x2_i^a)^b])^c) More...

#include <ScaledGeneralizedDistanceRBFKernel.h>

Inheritance diagram for PLearn::ScaledGeneralizedDistanceRBFKernel:
Inheritance graph
[legend]
Collaboration diagram for PLearn::ScaledGeneralizedDistanceRBFKernel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScaledGeneralizedDistanceRBFKernel ()
 ScaledGeneralizedDistanceRBFKernel (Vec the_phi, Vec the_a, real the_b, real the_c)
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual
ScaledGeneralizedDistanceRBFKernel
deepCopy (CopiesMap &copies) const
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be.
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 PPathdeclaringFile ()

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 recognized options are "b" and "c"

Protected Attributes

real b
real c
Vec phi
Vec a

Private Types

typedef Kernel inherited

Detailed Description

returns exp(-(sum_i phi_i*[abs(x1_i^a - x2_i^a)^b])^c)

Definition at line 54 of file ScaledGeneralizedDistanceRBFKernel.h.


Member Typedef Documentation

Reimplemented from PLearn::Kernel.

Definition at line 56 of file ScaledGeneralizedDistanceRBFKernel.h.


Constructor & Destructor Documentation

PLearn::ScaledGeneralizedDistanceRBFKernel::ScaledGeneralizedDistanceRBFKernel ( ) [inline]

Definition at line 63 of file ScaledGeneralizedDistanceRBFKernel.h.

        : b(), c(), phi(), a() {}
PLearn::ScaledGeneralizedDistanceRBFKernel::ScaledGeneralizedDistanceRBFKernel ( Vec  the_phi,
Vec  the_a,
real  the_b,
real  the_c 
) [inline]

Definition at line 65 of file ScaledGeneralizedDistanceRBFKernel.h.

        : b(the_b), c(the_c), phi(the_phi), a(the_a)
    {}

Member Function Documentation

string PLearn::ScaledGeneralizedDistanceRBFKernel::_classname_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

OptionList & PLearn::ScaledGeneralizedDistanceRBFKernel::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

RemoteMethodMap & PLearn::ScaledGeneralizedDistanceRBFKernel::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

bool PLearn::ScaledGeneralizedDistanceRBFKernel::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

Object * PLearn::ScaledGeneralizedDistanceRBFKernel::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

StaticInitializer ScaledGeneralizedDistanceRBFKernel::_static_initializer_ & PLearn::ScaledGeneralizedDistanceRBFKernel::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

string PLearn::ScaledGeneralizedDistanceRBFKernel::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

void PLearn::ScaledGeneralizedDistanceRBFKernel::declareOptions ( OptionList ol) [static, protected]

recognized options are "b" and "c"

Reimplemented from PLearn::Kernel.

Definition at line 73 of file ScaledGeneralizedDistanceRBFKernel.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), and phi.

Here is the call graph for this function:

static const PPath& PLearn::ScaledGeneralizedDistanceRBFKernel::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Kernel.

Definition at line 69 of file ScaledGeneralizedDistanceRBFKernel.h.

:
ScaledGeneralizedDistanceRBFKernel * PLearn::ScaledGeneralizedDistanceRBFKernel::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

real PLearn::ScaledGeneralizedDistanceRBFKernel::evaluate ( const Vec x1,
const Vec x2 
) const [virtual]

** Subclasses must override this method **

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 58 of file ScaledGeneralizedDistanceRBFKernel.cc.

References a, b, c, PLearn::exp(), i, PLearn::TVec< T >::length(), PLERROR, and PLearn::pow().

{ 
#ifdef BOUNDCHECK
    if(x1.length()!=x2.length())
        PLERROR("IN ScaledGeneralizedDistanceRBFKernel::evaluate x1 and x2 must have the same length");
#endif

    real summ = 0.0;
    real* ph=phi.data();
    real* aa=a.data();
    for(int i=0; i<x1.length(); i++)
        summ += ph[i]*pow(fabs(pow(x1[i],aa[i])-pow(x2[i],aa[i])), (real)b);
    return exp(-pow(summ,c));
}

Here is the call graph for this function:

OptionList & PLearn::ScaledGeneralizedDistanceRBFKernel::getOptionList ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

OptionMap & PLearn::ScaledGeneralizedDistanceRBFKernel::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

RemoteMethodMap & PLearn::ScaledGeneralizedDistanceRBFKernel::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file ScaledGeneralizedDistanceRBFKernel.cc.

void PLearn::ScaledGeneralizedDistanceRBFKernel::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be.

This needs to be overridden by every class that adds "complex" data members to the class, such as Vec, Mat, PP<Something>, etc. Typical implementation:

  void CLASS_OF_THIS::makeDeepCopyFromShallowCopy(CopiesMap& copies)
  {
      inherited::makeDeepCopyFromShallowCopy(copies);
      deepCopyField(complex_data_member1, copies);
      deepCopyField(complex_data_member2, copies);
      ...
  }
Parameters:
copiesA map used by the deep-copy mechanism to keep track of already-copied objects.

Reimplemented from PLearn::Kernel.

Definition at line 51 of file ScaledGeneralizedDistanceRBFKernel.cc.

References a, and PLearn::deepCopyField().

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::Kernel.

Definition at line 69 of file ScaledGeneralizedDistanceRBFKernel.h.

Definition at line 60 of file ScaledGeneralizedDistanceRBFKernel.h.

Definition at line 59 of file ScaledGeneralizedDistanceRBFKernel.h.

Definition at line 59 of file ScaledGeneralizedDistanceRBFKernel.h.

Definition at line 60 of file ScaledGeneralizedDistanceRBFKernel.h.

Referenced by declareOptions().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines