pyepo.metric.regret
True regret loss
Functions
  | 
A function to evaluate model performance with normalized true regret  | 
  | 
A function to calculate normalized true regret for a batch  | 
Module Contents
- pyepo.metric.regret.regret(predmodel, optmodel, dataloader)
 A function to evaluate model performance with normalized true regret
- Parameters:
 predmodel (nn) – a regression neural network for cost prediction
optmodel (optModel) – an PyEPO optimization model
dataloader (DataLoader) – Torch dataloader from optDataSet
- Returns:
 true regret loss
- Return type:
 float
- pyepo.metric.regret.calRegret(optmodel, pred_cost, true_cost, true_obj)
 A function to calculate normalized true regret for a batch
- Parameters:
 optmodel (optModel) – optimization model
pred_cost (torch.tensor) – predicted costs
true_cost (torch.tensor) – true costs
true_obj (torch.tensor) – true optimal objective values
- Returns:predmodel
 float: true regret losses