class revrand.basis_functions.BiasBasis(offset=1.0, regularizer=None)

Bias Basis for adding a bias term to a regressor.

This just returns a column of a constant value so a bias term can be learned by a regressor.

\[\phi(\mathbf{X}) = \mathbf{1} \times \text{const}\]
  • offset (float, optional) – A scalar value to give the bias column. By default this is one.
  • 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__(offset=1.0, regularizer=None)

See this class’s docstring.


__init__([offset, regularizer]) See this class’s docstring.
get_dim(X) Get the output dimensionality of this basis.
grad(X) Return the gradient of the basis function for each parameter.
params_values() Get a list of the Parameter values if they have a value.
regularizer_diagonal(X[, regularizer]) Get the diagonal of the prior variance on the weights (regularizer).
transform(X) Return this basis applied to X.


params Get this basis’ Parameter types.
regularizer Get the Parameter value of this basis’ regularizer.