Tabulation
Model post-processing class for generating two outputs: 1. Weekly wholesaler, product-pack and vehicle level spends, incremental revenue along with the ROIs 2. Dataframes for visualizing diminishing return curves for each wholesaler, product-pack and vehicle
Source code in wt_ml/tabulation/tabulation.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
__init__(dataset_factory, encodings, gt_model)
Class initialization needed for model post-processing
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_factory |
DataFactoryType
|
generator function for iterating over batches of data |
required |
encodings |
dict
|
mapping from names to indices for wholesalers, brands, products, vehicles and so on |
required |
gt_model |
EconomicNetwork
|
trained ground truth model to be used for inference |
required |
Source code in wt_ml/tabulation/tabulation.py
25 26 27 28 29 30 31 32 33 34 35 36 |
|
get_roicurves()
Generates dataframes for visualizing diminishing return curves for each wholesaler, product-pack and vehicle
Returns:
Type | Description |
---|---|
pd.DataFrame, pd.DataFrame: diminishing return curves for media vehicles |
Source code in wt_ml/tabulation/tabulation.py
67 68 69 70 71 72 73 74 75 76 77 |
|
get_weekly_roi_facts()
Generates weekly wholesaler, product-pack and vehicle level spends, incremental revenues and ROIs
Returns:
Type | Description |
---|---|
pd.DataFrame: weekly roi facts for each wholesaler, product-pack and vehicle |
Source code in wt_ml/tabulation/tabulation.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|