physbo.gp.predictor module
- class physbo.gp.predictor.predictor(config, model=None)[source]
Bases:
base_predictor
- delete_stats()[source]
Default function to delete status. This function must be overwritten in each model.
- Parameters:
args
kwds
- fit(training, num_basis=None)[source]
Fitting model to training dataset
- Parameters:
training (physbo.variable) – dataset for training
num_basis (int) – the number of basis (default: self.config.predict.num_basis)
- get_post_fcov(training, test, diag=True)[source]
Calculating posterior variance-covariance matrix of model
- Parameters:
training (physbo.variable) – training dataset. If already trained, the model does not use this.
test (physbo.variable) – inputs
diag (bool) – Diagonlization flag in physbo.exact.get_post_fcov function.
- Return type:
numpy.ndarray
- get_post_fmean(training, test)[source]
Calculating posterior mean value of model
- Parameters:
training (physbo.variable) – training dataset. If already trained, the model does not use this.
test (physbo.variable) – inputs
- Return type:
numpy.ndarray
- get_post_samples(training, test, alpha=1)[source]
Drawing samples of mean values of model
- Parameters:
training (physbo.variable) – training dataset. If already trained, the model does not use this.
test (physbo.variable) – inputs (not used)
alpha (float) – tuning parameter of the covariance by multiplying alpha**2 for np.random.multivariate_normal.
- Return type:
numpy.ndarray
- get_predict_samples(training, test, N=1)[source]
Drawing samples of values of model
- Parameters:
training (physbo.variable) – training dataset. If already trained, the model does not use this.
test (physbo.variable) – inputs
N (int) – number of samples (default: 1)
- Return type:
numpy.ndarray (N x len(test))