'Using MAPE in k fold cross validation sklearn

Need to use MAPE instead of R2 in a cross validation, just wanna know if there's any easy equivalent to

score = cross_val_score(reg, X, y, scoring='neg_mean_absolute_percentage_error', cv=kfold)

I saw sklearn listed MAPE as a scoring method here but when I tried to do the above code I got this error

'neg_mean_absolute_percentage_error' is not a valid scoring value



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source