physbo.blm.lik.linear module

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

ベースクラス: object

basis

basis for random feature map

nbasis

number of basis

Type

int

bias
params
_init_params[ソース]

initial value of the parameter

get_mean(X, Psi=None, params=None, bias=None)[ソース]

calculate mean values

パラメータ
  • 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)

戻り値

Psi * params + bias

戻り値の型

numpy.ndarray

set_bias(bias)[ソース]

set bias

パラメータ

bias (float) --

set_params(params)[ソース]

set parameters

パラメータ

params (np.ndarray) --