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
- 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