evaluation
rank_fva(y_true, y_pred, y_pred_bench=None, scoring=None, descending=False)
Sorts point forecasts in y_pred
across entities / time-series by score.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y_true |
DataFrame
|
Panel DataFrame of observed values. |
required |
y_pred |
DataFrame
|
Panel DataFrame of point forecasts. |
required |
y_pred_bench |
DataFrame
|
Panel DataFrame of benchmark forecast values. |
None
|
scoring |
Optional[metric]
|
If None, defaults to SMAPE. |
None
|
descending |
bool
|
Sort in descending order. Defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
ranks |
DataFrame
|
Cross-sectional DataFrame with two columns: entity name and score. |
rank_point_forecasts(y_true, y_pred, sort_by='smape', descending=False)
Sorts point forecasts in y_pred
across entities / time-series by score.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y_true |
DataFrame
|
Panel DataFrame of observed values. |
required |
y_pred |
DataFrame
|
Panel DataFrame of point forecasts. |
required |
sort_by |
str
|
Method to sort forecasts by:
|
'smape'
|
descending |
bool
|
Sort in descending order. Defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
ranks |
DataFrame
|
Cross-sectional DataFrame with two columns: entity name and score. |
rank_residuals(y_resids, sort_by='abs_bias', descending=False)
Sorts point forecasts in y_pred
across entities / time-series by score.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y_resids |
DataFrame
|
Panel DataFrame of residuals by splits. |
required |
sort_by |
str
|
Method to sort residuals by: |
'abs_bias'
|
descending |
bool
|
Sort in descending order. Defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
ranks |
DataFrame
|
Cross-sectional DataFrame with two columns: entity name and score. |