Package mvpa :: Package clfs :: Module kernel :: Class KernelSquaredExponential

[hide private]
[frames] | no frames]

# Class KernelSquaredExponential

source code

The Squared Exponential kernel class.

Note that it can handle a length scale for each dimension for Automtic Relevance Determination.

Instance Methods | [hide private]

__init__(self, length_scale=1.0, sigma_f=1.0, **kwargs) Initialize a Squared Exponential kernel instance. | source code

reset(self) Resets the kernel dropping internal variables to the original values | source code

__repr__(self) repr(x) | source code

compute(self, data1, data2=None) Compute kernel matrix. | source code

set_hyperparameters(self, hyperparameter) Set hyperaparmeters from a vector. | source code

compute_lml_gradient(self, alphaalphaT_Kinv, data) Compute grandient of the kernel and return the portion of log marginal likelihood gradient due to the kernel. Shorter formula. Allows vector of lengthscales (ARD). | source code

compute_lml_gradient_logscale(self, alphaalphaT_Kinv, data) Compute grandient of the kernel and return the portion of log marginal likelihood gradient due to the kernel. Hyperparameters are in log scale which is sometimes more stable. Shorter formula. Allows vector of lengthscales (ARD). | source code

_setlength_scale(self, v) Set value of length_scale and its _orig | source code

Inherited from `Kernel`: `compute_gradient` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]

| length_scale = `property(fget= lambda x: x._length_scale, fset=`...``

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, length_scale=1.0, sigma_f=1.0, **kwargs)
(Constructor)

source code

Initialize a Squared Exponential kernel instance.

Parameters:
  - `length_scale` (float OR numpy.ndarray) - the characteristic length-scale (or length-scales) of the phenomenon under investigation. (Defaults to 1.0)
  - `sigma_f` (float) - Signal standard deviation. (Defaults to 1.0)
Overrides: object.__init__

### reset(self)

source code

Resets the kernel dropping internal variables to the original values

Overrides: Kernel.reset
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)

### compute(self, data1, data2=None)

source code

Compute kernel matrix.

Parameters:
  - `data1` (numpy.ndarray) - data
  - `data2` (numpy.ndarray) - data (Defaults to None)
Overrides: Kernel.compute

### set_hyperparameters(self, hyperparameter)

source code

Set hyperaparmeters from a vector.

Used by model selection.

### compute_lml_gradient(self, alphaalphaT_Kinv, data)

source code

Compute grandient of the kernel and return the portion of log marginal likelihood gradient due to the kernel. Shorter formula. Allows vector of lengthscales (ARD).

Overrides: Kernel.compute_lml_gradient

### compute_lml_gradient_logscale(self, alphaalphaT_Kinv, data)

source code

Compute grandient of the kernel and return the portion of log marginal likelihood gradient due to the kernel. Hyperparameters are in log scale which is sometimes more stable. Shorter formula. Allows vector of lengthscales (ARD).

Overrides: Kernel.compute_lml_gradient_logscale

Class Variable Details | [hide private]

### length_scale

Value:

      property(fget= lambda x: x._length_scale, fset= _setlength_scale)