physbo.search.score module

physbo.search.score.EI(predictor, training, test, fmax=None)[ソース]

Maximum expected improvement.

パラメータ:
  • 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.

戻り値:

score

戻り値の型:

numpy.ndarray

physbo.search.score.PI(predictor, training, test, fmax=None)[ソース]

Maximum probability of improvement.

パラメータ:
  • 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.

戻り値:

score

戻り値の型:

numpy.ndarray

physbo.search.score.TS(predictor, training, test, alpha=1)[ソース]

Thompson sampling (See Sec. 2.1 in Materials Discovery Volume 4, June 2016, Pages 18-21)

パラメータ:
  • 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)

戻り値:

score

戻り値の型:

numpy.ndarray

physbo.search.score.score(mode, predictor, test, training=None, **kwargs)[ソース]

Calculate scores (acquisition function) for test data.

パラメータ:
  • 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

  • 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"

戻り値:

score

戻り値の型:

numpy.ndarray

例外:

NotImplementedError -- If unknown mode is given