physbo.blm.basis.fourier module

class physbo.blm.basis.fourier.fourier(params)[ソース]

random feature maps Psi(X; W,b) = cos[X * Wt + b] * alpha

where

  • X: input, N-by-d matrix
  • W: weight, l-by-d matrix
  • Wt: transpose of W
  • b: bias, 1-by-l matrix
  • alpha: coefficient

and

  • N: number of data
  • d: dimension of input
  • l: number of basis
params

W, b, alpha

Type:Tuple
nbasis

number of basis

Type:int

References

A. Rahimi and B. Recht, "Random features for large-scale kernel machines," in "Advances in neural information processing systems," 2007, pp. 1177-1184.

get_basis(X, params=None)[ソース]

compute the value of basis

パラメータ:
  • X (numpy.ndarray) -- input
  • params (Tuple) -- W, b, alpha (default: self.params)
戻り値:

Psi(X; W,b) -- N-by-l matrix

cos[X * Wt + b] * alpha

where Wt is the transpose of W.

戻り値の型:

numpy.ndarray

set_params(params)[ソース]

update basis parameters

パラメータ:params (tuple) -- W, b, alpha
show()[ソース]

print parameters