physbo.search.score module¶
-
physbo.search.score.
EI
(predictor, training, test, fmax=None)[source]¶ Maximum expected improvement.
- Parameters
predictor (predictor object) – Base class is defined in physbo.predictor.
training (physbo.variable) – Training dataset. If the predictor is not trained, use this for training.
test (physbo.variable) – Inputs
fmax (float) – Max value of posterior probability distribution. If not set, the maximum value of posterior mean for training is used.
- Returns
score
- Return type
numpy.ndarray
-
physbo.search.score.
PI
(predictor, training, test, fmax=None)[source]¶ Maximum probability of improvement.
- Parameters
predictor (predictor object) – Base class is defined in physbo.predictor.
training (physbo.variable) – Training dataset. If the predictor is not trained, use this for training.
test (physbo.variable) – Inputs
fmax (float) – Max value of posterior probability distribution. If not set, the maximum value of posterior mean for training is used.
- Returns
score
- Return type
numpy.ndarray
-
physbo.search.score.
TS
(predictor, training, test, alpha=1)[source]¶ Thompson sampling (See Sec. 2.1 in Materials Discovery Volume 4, June 2016, Pages 18-21)
- Parameters
predictor (predictor object) – Base class is defined in physbo.predictor.
training (physbo.variable) – Training dataset. If the predictor is not trained, use this for training.
test (physbo.variable) – Inputs
alpha (float) – noise for sampling source (default: 1.0)
- Returns
score
- Return type
numpy.ndarray
-
physbo.search.score.
score
(mode, predictor, test, training=None, **kwargs)[source]¶ Calculate scores (acquisition function) for test data.
- Parameters
mode (str) –
Kind of score.
”EI”, “PI”, and “TS” are available.
predictor (predictor object) – Base class is defined in physbo.predictor.
training (physbo.variable) – Training dataset. If the predictor is not trained, use this for training.
test (physbo.variable) – Inputs
- Other Parameters
fmax (float) – Max value of mean of posterior probability distribution. If not set, the maximum value of posterior mean for training is used. Used only for mode == “EI” and “PI”
alpha (float) – noise for sampling source (default: 1.0) Used only for mode == “TS”
- Returns
score
- Return type
numpy.ndarray
- Raises
NotImplementedError – If unknown mode is given