physbo.blm.predictor module¶
-
class
physbo.blm.predictor.predictor(config, model=None)[ソース]¶ ベースクラス:
physbo.predictor.base_predictorPredictor using Baysean linear model
-
blm¶ - Type
physbo.blm.core.model
-
config¶ configuration
- Type
physbo.misc.set_config
-
fit(training, num_basis=None)[ソース]¶ fit model to training dataset
- パラメータ
training (physbo.variable) -- dataset for training
num_basis (int) -- the number of basis (default: self.config.predict.num_basis)
-
get_basis(X)[ソース]¶ calculates feature maps Psi(X)
- パラメータ
X (numpy.ndarray) -- inputs
- 戻り値
Psi -- feature maps
- 戻り値の型
numpy.ndarray
-
get_post_fcov(training, test)[ソース]¶ calculates posterior variance-covariance matrix of model
- パラメータ
training (physbo.variable) -- training dataset. If already trained, the model does not use this.
test (physbo.variable) -- inputs
- 戻り値
- 戻り値の型
numpy.ndarray
-
get_post_fmean(training, test)[ソース]¶ calculates posterior mean value of model
- パラメータ
training (physbo.variable) -- training dataset. If already trained, the model does not use this.
test (physbo.variable) -- inputs
- 戻り値
- 戻り値の型
numpy.ndarray
-
get_post_params(training, test)[ソース]¶ calculates posterior weights
- パラメータ
training (physbo.variable) -- training dataset. If already trained, the model does not use this.
test (physbo.variable) -- inputs (not used)
- 戻り値
- 戻り値の型
numpy.ndarray
-
get_post_samples(training, test, N=1, alpha=1.0)[ソース]¶ draws samples of mean values of model
- パラメータ
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)
alpha (float) -- noise for sampling source (default: 1.0)
- 戻り値
- 戻り値の型
numpy.ndarray
-
get_predict_samples(training, test, N=1)[ソース]¶ draws samples of values of model
- パラメータ
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)
alpha (float) -- noise for sampling source (default: 1.0)
- 戻り値
- 戻り値の型
numpy.ndarray
-
prepare(training)[ソース]¶ initializes model by using training data set
- パラメータ
training (physbo.variable) -- dataset for training
-
update(training, test)[ソース]¶ updates the model.
If not yet initialized (prepared), the model will be prepared by
training. Otherwise, the model will be updated bytest.- パラメータ
training (physbo.variable) -- training dataset for initialization (preparation). If already prepared, the model ignore this.
test (physbo.variable) -- training data for update. If not prepared, the model ignore this.
-