revrand.basis_functions.SigmoidalBasis¶
-
class
revrand.basis_functions.SigmoidalBasis(centres, lenscale=Parameter(value=1.0, bounds=Positive(upper=None), shape=()), regularizer=None)¶ Sigmoidal Basis.
\[\phi(\mathbf{X}) = \sigma \left( \frac{\|\mathbf{X} - \mathbf{C}\|}{l} \right)\]where \(\mathbf{C}\) are sigmoidal basis centres, \(l\) is a length scale and \(\sigma\) is the logistic sigmoid function defined by
\[\sigma(a) = \frac{1}{1+e^{-a}}.\]Parameters: - centres (ndarray) – array of shape (Dxd) where D is the number of centres for the bases, and d is the dimensionality of X.
- lenscale (Parameter, optional) – A scalar parameter to bound and initialise the length scales for optimization.
- regularizer (None, Parameter, optional) – The (initial) value of the regularizer/prior variance to apply to the
regression weights of this basis function. The Parameter object must
have a scalar value. If it is not set, it will take on a default value
of
Parameter(gamma(1.), Positive()).
-
__init__(centres, lenscale=Parameter(value=1.0, bounds=Positive(upper=None), shape=()), regularizer=None)¶ See this class’s docstring.
Methods
__init__(centres[, lenscale, bounds, shape, ...])See this class’s docstring. get_dim(X)Get the output dimensionality of this basis. grad(X[, lenscale])Get the gradients of this basis w.r.t. the length scale. params_values()Get a list of the Parametervalues if they have a value.regularizer_diagonal(X[, regularizer])Get the diagonal of the prior variance on the weights (regularizer). transform(X[, lenscale])Apply the sigmoid basis function to X. Attributes
paramsGet this basis’ Parameter types. regularizerGet the Parametervalue of this basis’ regularizer.