Package mvpa :: Package clfs :: Module kernel :: Class KernelLinear
[hide private]
[frames] | no frames]

Class KernelLinear

source code


The linear kernel class.
Instance Methods [hide private]
 
__init__(self, Sigma_p=None, sigma_0=1.0, **kwargs)
Initialize the linear kernel instance.
source code
 
__repr__(self)
repr(x)
source code
 
reset(self)
Resets the kernel dropping internal variables to the original values
source code
 
compute(self, data1, data2=None)
Compute kernel matrix. Set Sigma_p to correct dimensions and default value if necessary.
source code
 
set_hyperparameters(self, hyperparameter) source code
 
compute_lml_gradient(self, alphaalphaT_Kinv, data) source code
 
compute_lml_gradient_logscale(self, alphaalphaT_Kinv, data) source code
 
_setSigma_p(self, v)
Set Sigma_p value and store _orig for reset
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]
  Sigma_p = property(fget= lambda x: x._Sigma_p, fset= _setSigma_p)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, Sigma_p=None, sigma_0=1.0, **kwargs)
(Constructor)

source code 
Initialize the linear kernel instance.
Parameters:
  • Sigma_p (numpy.ndarray) - Covariance matrix of the Gaussian prior probability N(0,Sigma_p) on the weights of the linear regression. (Defaults to None)
  • sigma_0 (float) - the standard deviation of the Gaussian prior N(0,sigma_0**2) of the intercept of the linear regression. (Deafults to 1.0)
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

reset(self)

source code 
Resets the kernel dropping internal variables to the original values
Overrides: Kernel.reset
(inherited documentation)

compute(self, data1, data2=None)

source code 
Compute kernel matrix. Set Sigma_p to correct dimensions and default value if necessary.
Parameters:
  • data1 (numpy.ndarray) - data
  • data2 (numpy.ndarray) - data (Defaults to None)
Overrides: Kernel.compute

compute_lml_gradient(self, alphaalphaT_Kinv, data)

source code 
Overrides: Kernel.compute_lml_gradient

compute_lml_gradient_logscale(self, alphaalphaT_Kinv, data)

source code 
Overrides: Kernel.compute_lml_gradient_logscale