custom_metric(func)
Denotes a custom metric function.
Source code in wt_ml/tuning/custom_metrics.py
22 23 24 25 26 27 |
|
roi_variation(outputs, mask=None)
Calculate the mean absolute log of overall rois as metric which gets amplified whenever some rois are extremely high or extremely low for any granularity. Requires time axis at 0.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
outputs |
EconomicIntermediaries
|
Outputs of the Economic model. |
required |
mask |
TensorLike
|
Mask is not used. Created to ensure signature of custom_metric function. |
None
|
Returns:
Type | Description |
---|---|
Tensor
|
tf.Tensor: The mean absolute log values of overall rois for each granularity with a resulting shape of (batch,). |
Source code in wt_ml/tuning/custom_metrics.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
weighted_custom_metric(func)
Wraps a custom metric function so that it can calculate weighted average on the custom metric.
Source code in wt_ml/tuning/custom_metrics.py
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 |
|