variable encoding in K-fold validation of random forest using package 'caret'
问题 I want to run a RF classification just like it's specified in 'randomForest' but still use the k-fold repeated cross validation method (code below). How do I stop caret from creating dummy variables out of my categorical ones? I read that this may be due to One-Hot-Encoding, but not sure how to change this. I would be very greatful for some example lines on how to fix this! database: > str(river) 'data.frame': 121 obs. of 13 variables: $ stat_bino : Factor w/ 2 levels "0","1": 2 2 1 1 2 2 2 2