saealib.HeldOutAccuracyEvaluator#

class saealib.HeldOutAccuracyEvaluator(held_x, held_y, metrics=None)[ソース]#

ベースクラス: AccuracyEvaluator

Evaluates accuracy against pre-specified held-out data.

The surrogate is assumed to be already fitted; it is not re-fitted inside evaluate(). Useful for comparing surrogate predictions against the most recent true evaluations.

パラメータ:
  • held_x (np.ndarray) -- Held-out inputs. shape: (n_held, n_features)

  • held_y (np.ndarray) -- Held-out true objective values. shape: (n_held, n_obj)

  • metrics (list[SurrogateAccuracyMetric] or None) -- Metrics to compute.

Methods

__init__

evaluate

Predict on held-out data and compute metrics.

Method Details

HeldOutAccuracyEvaluator.__init__(held_x, held_y, metrics=None)[ソース]#
パラメータ:
HeldOutAccuracyEvaluator.evaluate(surrogate, train_x, train_y)[ソース]#

Predict on held-out data and compute metrics.

パラメータ:
  • surrogate (Surrogate)

  • train_x (np.ndarray)

  • train_y (np.ndarray)

戻り値の型:

SurrogateAccuracy