xesn.CostFunction.__call__

xesn.CostFunction.__call__#

CostFunction.__call__(macro_param_sets, is_transformed=True)#

Evaluate the cost function for a given set of parameter values

Parameters:
  • macro_param_sets (array_like) – with shape n_sets x n_parameters, where n_parameters is the number of scalar parameters being optimized, n_sets would be the number of examples to evaluate

  • is_transformed (bool, optional) – if True, then any transformations specified by config["macro_training"]["transformations"] have been applied. See xesn.optimize.transform() for an example

Returns:

cost (array_like) – with shape n_sets x 1, cost evaluate for each parameter set