API Reference
This is the class and function reference of ddop.
ddop.newsvendor
: Newsvendor decision making
The ddop.newsvendor
module contains different newsvendor approaches for
decision making.
Sample Average Approximation (SAA)
Weighted SAA (wSAA)
Empirical Risk Minimization (ERM)
ddop.metrics
: Evaluation metrics
The ddop.metrics
module includes different performance metrics that can be used for model selection and
evaluation.
|
Compute total costs based on the the difference between y_true and y_pred and the given underage and overage costs. |
|
Compute average costs based on the the difference between y_true and y_pred and the given underage and overage costs. |
|
Compute the coefficient of prescriptiveness that is defined as (1 - u/v), where u are the average costs between the true and predicted values (y_true,y_pred), and v are the average costs between the true values and the predictions obtained by SAA (y_pred_saa, y_pred). |
All performance metrics can also be used with scikit-learn model selection tools. However, therefore a proper scoring object has to be generated by using the make_scorer function.
|
Make a scorer from a performance metric or loss function. |
Moreover, the module contains a function to calculate the pairwise costs.
|
Compute pairwise costs based on the the difference between y_true and y_pred and the given underage and overage costs. |
ddop.datasets
: Datasets
ddop
comes with a few default datasets that can be loaded using the ddop.datasets
module.
Loaders
|
Load and return the YAZ dataset |
|
Load and return the bakery dataset |
|
Load and return the store item demand dataset. |
These datasets are useful to quickly illustrate the behavior of the various algorithms implemented in ddop.