0

I Used the following codes to make 39 models and select the best set of variables using the Recursive Feature Elimination method (RFE). RFE calculated a table in which there are columns for Variables, RMSE and R-squared. These are the codes:

set.seed(10)
ctrl <- rfeControl(functions = caretFuncs, method="repeatedcv", repeats =5, number= 5,
allowParallel = TRUE)
RF_39 <- rfe(X,Y, sizes = c(1:39), method = 'rf', rfeControl = ctrl, tuneGrid = data.frame(mtry=6))

The table that RFE made for me is like the following image: This table is the results of RFE

My Question: Can I add a condition to my codes to calculate Concordance instead of R-squared, because I need Concordance? Thanks

danlooo
  • 10,067
  • 2
  • 8
  • 22
Babak Kasraei
  • 77
  • 1
  • 6
  • Do you want to calculate concordance to select the best model using this criterion, or do you just want to calculate the concordance of the selected model which was selected using R2? Keep in mind that caret is deprecated in favor of tidymodels. – danlooo Apr 01 '22 at 07:22
  • I want to calculate concordance to select the best model. I want concordance to be calculated for all 39 models, and like another column to be added to my table. I want to see the column names like this: variables, RMSE, Rsquared, Concordance, MAE, RMSESD, RsquaredSD, ConcordanceSD, MAESD – Babak Kasraei Apr 01 '22 at 15:12
  • If you want to select the best model based on concordance criterion, you can define concordance in the `summaryFunction` argument of function `trainControl` – danlooo Apr 01 '22 at 16:55
  • How can I define concordance (CCC) in the 'SummaryFunction' argument of function 'trainControl'? The argument that SummaryFunction accepts is 'defaultSummary'. – Babak Kasraei Apr 04 '22 at 02:40
  • See https://stackoverflow.com/questions/62658672/custom-performance-function-in-caret-package-using-predicted-probability – danlooo Apr 04 '22 at 07:00

0 Answers0