pyepo.metric.metrics¶
Metrics for SKlearn model
Functions¶
|
A function to calculate normalized true regret |
|
A function to create sklearn scorer |
|
A function to create Auto-SKlearn scorer |
|
A function to calculate MSE for testing |
|
A function to create MSE scorer for testing |
Module Contents¶
- pyepo.metric.metrics.SPOError(pred_cost: numpy.ndarray, true_cost: numpy.ndarray, model_type: type, args: dict) float¶
A function to calculate normalized true regret
- Parameters:
pred_cost – predicted costs
true_cost – true costs
model_type – optModel class type
args – optModel args
- Returns:
regret loss
- Return type:
- pyepo.metric.metrics.makeSkScorer(optmodel: pyepo.model.opt.optModel) Callable¶
A function to create sklearn scorer
- Parameters:
optmodel – optimization model
- Returns:
callable object that returns a scalar score; less is better.
- Return type:
scorer
- pyepo.metric.metrics.makeAutoSkScorer(optmodel: pyepo.model.opt.optModel) Callable¶
A function to create Auto-SKlearn scorer
- Parameters:
optmodel – optimization model
- Returns:
callable object that returns a scalar score; less is better.
- Return type:
scorer
- pyepo.metric.metrics.testMSE(pred_cost: numpy.ndarray, true_cost: numpy.ndarray, model_type: type, args: dict) float¶
A function to calculate MSE for testing
- Parameters:
pred_cost – predicted costs
true_cost – true costs
model_type – optModel class type
args – optModel args
- Returns:
mse
- Return type:
- pyepo.metric.metrics.makeTestMSEScorer(optmodel: pyepo.model.opt.optModel) Callable¶
A function to create MSE scorer for testing
- Parameters:
optmodel – optimization model
- Returns:
callable object that returns a scalar score; less is better.
- Return type:
scorer