physbo.blm.lik.linear module

class physbo.blm.lik.linear.linear(basis, params=None, bias=None)[source]

Bases: object

basis

basis for random feature map

nbasis

number of basis

Type:

int

bias
params
_init_params[source]

initial value of the parameter

get_mean(X, Psi=None, params=None, bias=None)[source]

calculate mean values

Parameters:
  • X (numpy.ndarray) – input as an N-by-d matrix

  • Psi (numpy.ndarray) – feature maps Psi(X) as an N-by-l matrix (default: self.get_basis(X))

  • params (numpy.ndarray) – weight as a vector with size l (default: self.params)

  • bias (float) – (default: self.bias)

Returns:

Psi * params + bias

Return type:

numpy.ndarray

set_bias(bias)[source]

set bias

Parameters:

bias (float)

set_params(params)[source]

set parameters

Parameters:

params (np.ndarray)