physbo.gp.core.prior module
- class physbo.gp.core.prior.prior(mean, cov)[source]
Bases:
object
prior of gaussian process
- cat_params(mean_params, cov_params)[source]
- Parameters:
mean_params (numpy.ndarray) – Mean values of parameters
cov_params (numpy.ndarray) – Covariance matrix of parameters
- Return type:
numpy.ndarray
- decomp_params(params)[source]
decomposing the parameters to those of mean values and covariance matrix for priors
- Parameters:
params (numpy.ndarray) – parameters
- Returns:
mean_params (numpy.ndarray)
cov_params (numpy.ndarray)
- get_cov(X, Z=None, params=None, diag=False)[source]
Calculating the variance-covariance matrix of priors
- Parameters:
X (numpy.ndarray) – N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of search candidate.
Z (numpy.ndarray) – N x d dimensional matrix. Each row of Z denotes the d-dimensional feature vector of tests.
params (numpy.ndarray) – Parameters.
diag (bool) – If X is the diagonalization matrix, true.
- Return type:
numpy.ndarray
- get_grad_cov(X, params=None)[source]
Calculating the covariance matrix priors
- Parameters:
X (numpy.ndarray) – N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of search candidate.
params (numpy.ndarray) – Parameters.
- Return type:
numpy.ndarray
- get_grad_mean(num_data, params=None)[source]
Calculating the gradiant of mean values of priors
- Parameters:
num_data (int) – Total number of data
params (numpy.ndarray) – Parameters
- Return type:
numpy.ndarray
- get_mean(num_data, params=None)[source]
Calculating the mean value of priors
- Parameters:
num_data (int) – Total number of data
params (numpy.ndarray) – Parameters
- Return type:
float
- sampling(X, N=1)[source]
Sampling from GP prior
- Parameters:
X (numpy.ndarray) – N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of search candidate.
N (int)
- Return type:
float
- set_cov_params(params)[source]
Setting parameters for covariance matrix of priors
- Parameters:
params (numpy.ndarray) – Parameters