Problem with metric in AdaBoost

I have a problem when tuning an AdaBoost model on my data. I have the following code:

ada_tune <- train(
x = HD_train[,-1],
y = HD_train$HeartDisease,
method = "ada",
metric = "ROC",
trControl = trainControl(
method = "cv",
number = 10,
classProbs = TRUE
)
)

However, it is using the metric Accuracy to select the best parameters even thought I have metric = "ROC".

This is some information of what ada_tune has:

Tuning parameter 'nu' was held constant at a value of 0.1
Accuracy was used to select the optimal model using
the largest value.
The final values used for the model were iter =
150, maxdepth = 2 and nu = 0.1.

Just in case, this is my the str of my data:

str(HD_train)
'data.frame': 239846 obs. of 24 variables:
HeartDisease : Factor w/ 2 levels "No","Yes": 1 1 1 2 1 1 1 1 2 1 ... BMI : num 16.6 20.3 23.7 28.9 21.6 ...
Smoking : num 1 0 0 1 0 1 0 0 1 1 ... AlcoholDrinking : num 0 0 0 0 0 0 0 0 0 0 ...
Stroke : num 0 1 0 0 0 0 0 0 0 0 ... PhysicalHealth : num 3 0 28 6 15 5 0 0 30 0 ...
MentalHealth : num 30 0 0 0 0 0 0 0 0 0 ... DiffWalking : num 0 0 1 1 0 1 0 1 1 0 ...
Sex : num 1 1 1 1 1 1 1 0 0 1 ... AgeCategory : num 57 85 42 77 72 85 85 67 62 57 ...
Race.Asian : num 0 0 0 0 0 0 0 0 0 0 ... Race.Black : num 0 0 0 1 0 0 0 0 0 0 ...
Race.Hispanic : num 0 0 0 0 0 0 0 0 0 0 ... Race.Other : num 0 0 0 0 0 0 0 0 0 0 ...
Race.White : num 1 1 1 0 1 1 1 1 1 1 ... Diabetic.No..borderline.diabetes: num 0 0 0 0 0 0 1 0 0 0 ...
Diabetic.Yes : num 1 0 0 0 0 1 0 0 1 0 ... Diabetic.Yes..during.pregnancy. : num 0 0 0 0 0 0 0 0 0 0 ...
PhysicalActivity : num 1 1 1 0 1 0 0 1 0 1 ... GenHealth : num 3 3 3 1 1 2 1 2 0 3 ...
SleepTime : num 5 7 8 12 4 9 5 10 15 5 ... Asthma : num 1 0 0 0 1 1 0 0 1 0 ...
KidneyDisease : num 0 0 0 0 0 0 1 0 0 0 ... SkinCancer : num 1 0 0 0 1 0 0 0 0 0 ...

Please someone help me. I will be very gratefull....

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.