Hi
I have defined a custom metric (adjusted MAPE) and I have added it to each of my top 20 models like this:
for model in top20:
# Compute adjusted MAPE for each partition
validation_score = adjustedMAPE(
y_true=model.__y_true[model.__partition_id == "0.0"],
y_pred=model.__y_pred[model.__partition_id == "0.0"])
holdout_score =adjustedMAPE(
y_true=model.__y_true[model.__partition_id == "Holdout"],
y_pred=model.__y_pred[model.__partition_id == "Holdout"])
# Create new metrics entry
model.metrics["AdjustedMAPE"] = {
"validation": validation_score,
"crossValidation": None,
"holdout": holdout_score,
"training": None,
"backtestingScores": None,
"backtesting": None,
}
Please observe that, as this custom metric is defined after the models have been built, there is no crossvalidation value available for it.
How can I trigger the computation of the crossvalidation score once I have defined a custom metric as in this case?
Thanks