I have a KNN model in caret and I'd like to optimize for median relative absolute error.
library(caret)
model <- train(
close_price~ ., data = train.data, method = "knn",
trControl = trainControl("cv", number = 10),
preProcess = c("center", "scale"),
metric = "MdRAE",
tuneLength = 10
)
I tried to use MdRAE
and MDRAE
and they both returned this error.
Warning message:
In train.default(x, y, weights = w, ...) :
The metric "MdRAE" was not in the result set. RMSE will be used instead
Is there a list of all the metrics available? I couldn't find it in the caret ebook.