PLearn 0.1
|
Base class for kernels that carry out Automatic Relevance Determination (ARD) More...
#include <ARDBaseKernel.h>
Public Member Functions | |
ARDBaseKernel () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual ARDBaseKernel * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
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 | m_isp_signal_sigma |
Inverse softplus of the global signal variance. Default value=0.0. | |
real | m_isp_global_sigma |
Inverse softplus of the global length-scale. | |
Vec | m_isp_input_sigma |
If specified, contain input-specific length-scales that can be individually optimized for (these are the ARD hyperparameters). | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares the class options. | |
Protected Attributes | |
Vec | m_input_sigma |
Buffer for final input sigma (add both global and per-input terms); Can be used by derived class. | |
Private Types | |
typedef KroneckerBaseKernel | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Base class for kernels that carry out Automatic Relevance Determination (ARD)
The purpose of this Kernel is to introduce utility options that are generally shared by Kernels that perform Automatic Relevance Determination (ARD). It does not introduce any specific behavior related to those options (since exactly where the ARD hyperparameters are used is very kernel-specific, this is left to derived classes).
Note that to make its operations more robust when used with unconstrained optimization of hyperparameters, all hyperparameters of this kernel are specified in the inverse softplus domain, hence the 'isp' prefix. This is used in preference to the log-domain used by Rasmussen and Williams in their implementation of gaussian processes, due to numerical stability. (It may happen that the optimizer jumps 'too far' along one hyperparameter and this causes the Gram matrix to become extremely ill-conditioned.)
Definition at line 64 of file ARDBaseKernel.h.
typedef KroneckerBaseKernel PLearn::ARDBaseKernel::inherited [private] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 66 of file ARDBaseKernel.h.
PLearn::ARDBaseKernel::ARDBaseKernel | ( | ) |
Default constructor.
Definition at line 60 of file ARDBaseKernel.cc.
: m_isp_signal_sigma(0.0), m_isp_global_sigma(0.0) { }
string PLearn::ARDBaseKernel::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
OptionList & PLearn::ARDBaseKernel::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
RemoteMethodMap & PLearn::ARDBaseKernel::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
Object * PLearn::ARDBaseKernel::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
StaticInitializer ARDBaseKernel::_static_initializer_ & PLearn::ARDBaseKernel::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
void PLearn::ARDBaseKernel::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 97 of file ARDBaseKernel.cc.
References PLearn::KroneckerBaseKernel::build(), and build_().
Referenced by PLearn::RationalQuadraticARDKernel::build(), and PLearn::Matern1ARDKernel::build().
{ // ### Nothing to add here, simply calls build_ inherited::build(); build_(); }
void PLearn::ARDBaseKernel::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 105 of file ARDBaseKernel.cc.
Referenced by build().
{ }
string PLearn::ARDBaseKernel::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
void PLearn::ARDBaseKernel::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 68 of file ARDBaseKernel.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::KroneckerBaseKernel::declareOptions(), m_isp_global_sigma, m_isp_input_sigma, and m_isp_signal_sigma.
Referenced by PLearn::RationalQuadraticARDKernel::declareOptions(), and PLearn::Matern1ARDKernel::declareOptions().
{ declareOption( ol, "isp_signal_sigma", &ARDBaseKernel::m_isp_signal_sigma, OptionBase::buildoption, "Inverse softplus of the global signal variance. Default value=0.0"); declareOption( ol, "isp_global_sigma", &ARDBaseKernel::m_isp_global_sigma, OptionBase::buildoption, "Inverse softplus of the global length-scale. Note that if ARD is\n" "performed on input-specific sigmas, this hyperparameter should have a\n" "fixed value (and not be varied during the optimization). Default\n" "value=0.0.\n"); declareOption( ol, "isp_input_sigma", &ARDBaseKernel::m_isp_input_sigma, OptionBase::buildoption, "If specified, contain input-specific length-scales that can be\n" "individually optimized for (these are the ARD hyperparameters).\n"); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::ARDBaseKernel::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 98 of file ARDBaseKernel.h.
:
ARDBaseKernel * PLearn::ARDBaseKernel::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
OptionList & PLearn::ARDBaseKernel::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
OptionMap & PLearn::ARDBaseKernel::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
RemoteMethodMap & PLearn::ARDBaseKernel::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 58 of file ARDBaseKernel.cc.
void PLearn::ARDBaseKernel::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 109 of file ARDBaseKernel.cc.
References PLearn::deepCopyField(), m_input_sigma, m_isp_input_sigma, and PLearn::KroneckerBaseKernel::makeDeepCopyFromShallowCopy().
Referenced by PLearn::RationalQuadraticARDKernel::makeDeepCopyFromShallowCopy(), and PLearn::Matern1ARDKernel::makeDeepCopyFromShallowCopy().
{ inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(m_isp_input_sigma, copies); deepCopyField(m_input_sigma, copies); }
Reimplemented from PLearn::KroneckerBaseKernel.
Reimplemented in PLearn::LinearARDKernel, PLearn::Matern1ARDKernel, PLearn::NeuralNetworkARDKernel, PLearn::RationalQuadraticARDKernel, and PLearn::SquaredExponentialARDKernel.
Definition at line 98 of file ARDBaseKernel.h.
Vec PLearn::ARDBaseKernel::m_input_sigma [mutable, protected] |
Buffer for final input sigma (add both global and per-input terms); Can be used by derived class.
Definition at line 112 of file ARDBaseKernel.h.
Referenced by PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), and makeDeepCopyFromShallowCopy().
Inverse softplus of the global length-scale.
Note that if ARD is performed on input-specific sigmas, this hyperparameter should have a fixed value (and not be varied during the optimization). Default value=0.0.
Definition at line 80 of file ARDBaseKernel.h.
Referenced by PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspInputSigma(), declareOptions(), PLearn::Matern1ARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), and PLearn::RationalQuadraticARDKernel::evaluate_all_i_x().
Vec PLearn::ARDBaseKernel::m_isp_input_sigma [mutable] |
If specified, contain input-specific length-scales that can be individually optimized for (these are the ARD hyperparameters).
Definition at line 86 of file ARDBaseKernel.h.
Referenced by PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivative(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspInputSigma(), declareOptions(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), and makeDeepCopyFromShallowCopy().
Inverse softplus of the global signal variance. Default value=0.0.
Definition at line 72 of file ARDBaseKernel.h.
Referenced by PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspSignalSigma(), declareOptions(), PLearn::RationalQuadraticARDKernel::derivIspAlpha(), PLearn::Matern1ARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::RationalQuadraticARDKernel::derivIspSignalSigma(), PLearn::Matern1ARDKernel::derivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), and PLearn::RationalQuadraticARDKernel::evaluate_all_i_x().